summaryrefslogtreecommitdiffstats
path: root/Source/cmInstallExportGenerator.h
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2008-01-28 13:38:36 (GMT)
committerBrad King <brad.king@kitware.com>2008-01-28 13:38:36 (GMT)
commit5594ad488576a77d9c6b8c3c1999a04fb4e6867d (patch)
treef22726476b6eaaf3832e48c185fe3c112601db17 /Source/cmInstallExportGenerator.h
parenta7cb9d1120c0555f1da67dd585bd1b4fd16d389d (diff)
downloadCMake-5594ad488576a77d9c6b8c3c1999a04fb4e6867d.zip
CMake-5594ad488576a77d9c6b8c3c1999a04fb4e6867d.tar.gz
CMake-5594ad488576a77d9c6b8c3c1999a04fb4e6867d.tar.bz2
ENH: Updated exporting and importing of targets to support libraries and configurations.
- Created cmExportFileGenerator hierarchy to implement export file generation - Installed exports use per-config import files loaded by a central one. - Include soname of shared libraries in import information - Renamed PREFIX to NAMESPACE in INSTALL(EXPORT) and EXPORT() commands - Move addition of CMAKE_INSTALL_PREFIX to destinations to install generators - Import files compute the installation prefix relative to their location when loaded - Add mapping of importer configurations to importee configurations - Rename IMPORT targets to IMPORTED targets to distinguish from windows import libraries - Scope IMPORTED targets within directories to isolate them - Place all properties created by import files in the IMPORTED namespace - Document INSTALL(EXPORT) and EXPORT() commands. - Document IMPORTED signature of add_executable and add_library - Enable finding of imported targets in cmComputeLinkDepends
Diffstat (limited to 'Source/cmInstallExportGenerator.h')
-rw-r--r--Source/cmInstallExportGenerator.h84
1 files changed, 21 insertions, 63 deletions
diff --git a/Source/cmInstallExportGenerator.h b/Source/cmInstallExportGenerator.h
index ee0ae3e..24f4aac 100644
--- a/Source/cmInstallExportGenerator.h
+++ b/Source/cmInstallExportGenerator.h
@@ -19,42 +19,12 @@
#include "cmInstallGenerator.h"
-class cmTarget;
-
-
-class cmInstallTargetGenerator;
+class cmExportInstallFileGenerator;
class cmInstallFilesGenerator;
-
-/* 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,
- cmInstallTargetGenerator* library,
- cmInstallTargetGenerator* framework,
- cmInstallTargetGenerator* bundle,
- cmInstallFilesGenerator* headers
- ) : Target(tgt), ArchiveGenerator(archive),
- RuntimeGenerator(runtime), LibraryGenerator(library),
- FrameworkGenerator(framework), BundleGenerator(bundle),
- HeaderGenerator(headers) {}
-
- cmTarget* Target;
- cmInstallTargetGenerator* ArchiveGenerator;
- cmInstallTargetGenerator* RuntimeGenerator;
- cmInstallTargetGenerator* LibraryGenerator;
- cmInstallTargetGenerator* FrameworkGenerator;
- cmInstallTargetGenerator* BundleGenerator;
- cmInstallFilesGenerator* HeaderGenerator;
-private:
- cmTargetExport();
-};
-
+class cmInstallTargetGenerator;
+class cmTarget;
+class cmTargetExport;
+class cmMakefile;
/** \class cmInstallExportGenerator
* \brief Generate rules for creating an export files.
@@ -62,45 +32,33 @@ private:
class cmInstallExportGenerator: public cmInstallGenerator
{
public:
- cmInstallExportGenerator(const char* dest, const char* file_permissions,
+ cmInstallExportGenerator(const char* name,
+ const char* dest, const char* file_permissions,
const std::vector<std::string>& configurations,
const char* component,
- const char* filename, const char* prefix,
- const char* tempOutputDir);
-
- bool SetExportSet(const char* name,
- const std::vector<cmTargetExport*>* exportSet);
+ const char* filename, const char* name_space,
+ cmMakefile* mf);
+ ~cmInstallExportGenerator();
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();
- };
+ typedef std::vector<cmTargetExport*> ExportSet;
typedef cmInstallGeneratorIndent Indent;
virtual void GenerateScript(std::ostream& os);
+ virtual void GenerateScriptConfigs(std::ostream& os, Indent const& indent);
virtual void GenerateScriptActions(std::ostream& os, Indent const& indent);
- static bool AddInstallLocations(cmTargetWithProperties *twp,
- cmInstallTargetGenerator* generator,
- const char* prefix);
- static bool AddInstallLocations(cmTargetWithProperties* twp,
- cmInstallFilesGenerator* generator,
- const char* propertyName);
+ void GenerateImportFile(ExportSet const* exportSet);
+ void GenerateImportFile(const char* config, ExportSet const* exportSet);
+ void ComputeTempDir();
std::string Name;
std::string FilePermissions;
- std::string Filename;
- std::string Prefix;
- std::string TempOutputDir;
- std::string ExportFilename;
+ std::string FileName;
+ std::string Namespace;
+ cmMakefile* Makefile;
- std::vector<cmTargetWithProperties*> Targets;
+ std::string TempDir;
+ std::string MainImportFile;
+ cmExportInstallFileGenerator* EFGen;
};
#endif