2007-06-19 21:10:21 +04:00
|
|
|
/*=========================================================================
|
|
|
|
|
|
|
|
Program: CMake - Cross-Platform Makefile Generator
|
|
|
|
Module: $RCSfile$
|
|
|
|
Language: C++
|
|
|
|
Date: $Date$
|
|
|
|
Version: $Revision$
|
|
|
|
|
|
|
|
Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved.
|
|
|
|
See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
|
|
|
|
|
|
|
|
This software is distributed WITHOUT ANY WARRANTY; without even
|
|
|
|
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
|
|
|
PURPOSE. See the above copyright notices for more information.
|
|
|
|
|
|
|
|
=========================================================================*/
|
|
|
|
#ifndef cmInstallExportGenerator_h
|
|
|
|
#define cmInstallExportGenerator_h
|
|
|
|
|
|
|
|
#include "cmInstallGenerator.h"
|
|
|
|
|
|
|
|
class cmTarget;
|
|
|
|
|
|
|
|
|
|
|
|
class cmInstallTargetGenerator;
|
2007-08-28 00:04:57 +04:00
|
|
|
class cmInstallFilesGenerator;
|
2007-06-19 21:10:21 +04:00
|
|
|
|
|
|
|
/* cmInstallExportTarget is used in cmGlobalGenerator to collect the
|
|
|
|
install generators for the exported targets. These are then used by the
|
|
|
|
cmInstallExportGenerator.
|
|
|
|
*/
|
|
|
|
class cmTargetExport
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
cmTargetExport(cmTarget* tgt,
|
|
|
|
cmInstallTargetGenerator* archive,
|
|
|
|
cmInstallTargetGenerator* runtime,
|
2007-08-22 19:32:48 +04:00
|
|
|
cmInstallTargetGenerator* library,
|
|
|
|
cmInstallTargetGenerator* framework,
|
2007-08-28 00:04:57 +04:00
|
|
|
cmInstallTargetGenerator* bundle,
|
|
|
|
cmInstallFilesGenerator* headers
|
2007-06-19 21:10:21 +04:00
|
|
|
) : Target(tgt), ArchiveGenerator(archive),
|
2007-08-22 19:32:48 +04:00
|
|
|
RuntimeGenerator(runtime), LibraryGenerator(library),
|
2007-08-28 00:04:57 +04:00
|
|
|
FrameworkGenerator(framework), BundleGenerator(bundle),
|
|
|
|
HeaderGenerator(headers) {}
|
2007-06-19 21:10:21 +04:00
|
|
|
|
|
|
|
cmTarget* Target;
|
|
|
|
cmInstallTargetGenerator* ArchiveGenerator;
|
|
|
|
cmInstallTargetGenerator* RuntimeGenerator;
|
|
|
|
cmInstallTargetGenerator* LibraryGenerator;
|
2007-08-22 19:32:48 +04:00
|
|
|
cmInstallTargetGenerator* FrameworkGenerator;
|
|
|
|
cmInstallTargetGenerator* BundleGenerator;
|
2007-08-28 00:04:57 +04:00
|
|
|
cmInstallFilesGenerator* HeaderGenerator;
|
2007-06-19 21:10:21 +04:00
|
|
|
private:
|
|
|
|
cmTargetExport();
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/** \class cmInstallExportGenerator
|
|
|
|
* \brief Generate rules for creating an export files.
|
|
|
|
*/
|
|
|
|
class cmInstallExportGenerator: public cmInstallGenerator
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
cmInstallExportGenerator(const char* dest, const char* file_permissions,
|
|
|
|
const std::vector<std::string>& configurations,
|
2007-07-02 22:56:57 +04:00
|
|
|
const char* component,
|
2007-06-19 21:10:21 +04:00
|
|
|
const char* filename, const char* prefix,
|
|
|
|
const char* tempOutputDir);
|
|
|
|
|
|
|
|
bool SetExportSet(const char* name,
|
|
|
|
const std::vector<cmTargetExport*>* exportSet);
|
|
|
|
protected:
|
|
|
|
// internal class which collects all the properties which will be set
|
|
|
|
// in the export file for the target
|
|
|
|
class cmTargetWithProperties
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
cmTargetWithProperties(cmTarget* target):Target(target) {}
|
|
|
|
cmTarget* Target;
|
|
|
|
std::map<std::string, std::string> Properties;
|
|
|
|
private:
|
|
|
|
cmTargetWithProperties();
|
|
|
|
};
|
|
|
|
|
2007-07-02 22:56:57 +04:00
|
|
|
typedef cmInstallGeneratorIndent Indent;
|
2007-06-19 21:10:21 +04:00
|
|
|
virtual void GenerateScript(std::ostream& os);
|
2007-07-02 22:56:57 +04:00
|
|
|
virtual void GenerateScriptActions(std::ostream& os, Indent const& indent);
|
2007-06-19 21:10:21 +04:00
|
|
|
static bool AddInstallLocations(cmTargetWithProperties *twp,
|
|
|
|
cmInstallTargetGenerator* generator,
|
|
|
|
const char* prefix);
|
2007-08-28 00:04:57 +04:00
|
|
|
static bool AddInstallLocations(cmTargetWithProperties* twp,
|
|
|
|
cmInstallFilesGenerator* generator,
|
|
|
|
const char* propertyName);
|
2007-06-19 21:10:21 +04:00
|
|
|
|
|
|
|
std::string Name;
|
|
|
|
std::string FilePermissions;
|
|
|
|
std::string Filename;
|
|
|
|
std::string Prefix;
|
|
|
|
std::string TempOutputDir;
|
|
|
|
std::string ExportFilename;
|
|
|
|
|
|
|
|
std::vector<cmTargetWithProperties*> Targets;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|