diff options
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmGlobalGenerator.cxx | 16 | ||||
-rw-r--r-- | Source/cmGlobalGenerator.h | 8 | ||||
-rw-r--r-- | Source/cmInstallCommand.cxx | 20 | ||||
-rw-r--r-- | Source/cmTargetExport.h | 12 |
4 files changed, 25 insertions, 31 deletions
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index a209ab6..77274dc 100644 --- a/Source/cmGlobalGenerator.cxx +++ b/Source/cmGlobalGenerator.cxx @@ -1467,18 +1467,10 @@ void cmGlobalGenerator::AddInstallComponent(const char* component) } void cmGlobalGenerator::AddTargetToExports(const char* exportSetName, - cmTarget* target, - cmInstallTargetGenerator* archive, - cmInstallTargetGenerator* runTime, - cmInstallTargetGenerator* library, - cmInstallTargetGenerator* framework, - cmInstallTargetGenerator* bundle, - cmInstallFilesGenerator* headers) -{ - if ((exportSetName) && (*exportSetName) && (target)) - { - cmTargetExport* te = new cmTargetExport(target, archive, runTime, library, - framework, bundle, headers); + cmTargetExport *te) +{ + if ((exportSetName) && (*exportSetName) && (te)) + { this->ExportSets[exportSetName].push_back(te); } } diff --git a/Source/cmGlobalGenerator.h b/Source/cmGlobalGenerator.h index b0c7059..29f11e1 100644 --- a/Source/cmGlobalGenerator.h +++ b/Source/cmGlobalGenerator.h @@ -154,13 +154,7 @@ public: { return &this->InstallComponents; } ///! Add one installed target to the sets of the exports - void AddTargetToExports(const char* exportSet, cmTarget* target, - cmInstallTargetGenerator* archive, - cmInstallTargetGenerator* runTime, - cmInstallTargetGenerator* library, - cmInstallTargetGenerator* framework, - cmInstallTargetGenerator* bundle, - cmInstallFilesGenerator* publicHeaders); + void AddTargetToExports(const char* exportSet, cmTargetExport* te); ///! Get the export target set with the given name const std::vector<cmTargetExport*>* GetExportSet(const char* name) const; diff --git a/Source/cmInstallCommand.cxx b/Source/cmInstallCommand.cxx index 4016734..de92538 100644 --- a/Source/cmInstallCommand.cxx +++ b/Source/cmInstallCommand.cxx @@ -17,6 +17,7 @@ #include "cmInstallTargetGenerator.h" #include "cmInstallExportGenerator.h" #include "cmInstallCommandArguments.h" +#include "cmTargetExport.h" #include <cmsys/Glob.hxx> @@ -735,6 +736,24 @@ bool cmInstallCommand::HandleTargetsMode(std::vector<std::string> const& args) // this is not a namelink-only rule. if(!exports.GetString().empty() && !namelinkOnly) { + cmTargetExport *te = new cmTargetExport; + te->Target = ⌖ + te->ArchiveGenerator = archiveGenerator; + te->BundleGenerator = bundleGenerator; + te->FrameworkGenerator = frameworkGenerator; + te->HeaderGenerator = publicHeaderGenerator; + te->LibraryGenerator = libraryGenerator; + te->RuntimeGenerator = runtimeGenerator; + this->Makefile->GetLocalGenerator()->GetGlobalGenerator() + ->AddTargetToExports(exports.GetCString(), te); + } + } + + + // Add this install rule to an export if one was specified and + // this is not a namelink-only rule. + if(!exports.GetString().empty() && !namelinkOnly) + { this->Makefile->GetLocalGenerator()->GetGlobalGenerator() ->AddTargetToExports(exports.GetCString(), &target, archiveGenerator, runtimeGenerator, @@ -743,6 +762,7 @@ bool cmInstallCommand::HandleTargetsMode(std::vector<std::string> const& args) } } + // Tell the global generator about any installation component names // specified if (installsArchive) diff --git a/Source/cmTargetExport.h b/Source/cmTargetExport.h index ad677b0..c9d87fb 100644 --- a/Source/cmTargetExport.h +++ b/Source/cmTargetExport.h @@ -23,18 +23,6 @@ class cmInstallFilesGenerator; 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; ///< The target ///@name Generators |