diff options
author | Brad King <brad.king@kitware.com> | 2019-07-31 19:17:45 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2019-07-31 23:32:55 (GMT) |
commit | d70a0f8681919713940d254f9e23141f69f68c31 (patch) | |
tree | 52ece17592afe59331a49ffd887998d6f9124d49 /Source/cmTarget.cxx | |
parent | f43a7d76c737c5bb9b903a2b1be5186c081ec21e (diff) | |
download | CMake-d70a0f8681919713940d254f9e23141f69f68c31.zip CMake-d70a0f8681919713940d254f9e23141f69f68c31.tar.gz CMake-d70a0f8681919713940d254f9e23141f69f68c31.tar.bz2 |
fileapi: Fix codemodel target install destination for cross-dir rules
Since commit e89ad0f94e (install: Allow installing targets created in
another directory, 2018-06-18, v3.13.0-rc1~407^2) we support calling
`install(TARGETS)` for targets created in another directory. However,
install generators are associated with the directory in which the call
to `install()` appears. This may not be the same directory in which the
target is defined. Record in each target the list of install generators
it has.
Fixes: #19546
Diffstat (limited to 'Source/cmTarget.cxx')
-rw-r--r-- | Source/cmTarget.cxx | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index cd67586..a67122c 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -177,6 +177,7 @@ public: std::vector<cmCustomCommand> PreBuildCommands; std::vector<cmCustomCommand> PreLinkCommands; std::vector<cmCustomCommand> PostBuildCommands; + std::vector<cmInstallTargetGenerator*> InstallGenerators; std::set<std::string> SystemIncludeDirectories; cmTarget::LinkLibraryVectorType OriginalLinkLibraries; std::vector<std::string> IncludeDirectoriesEntries; @@ -857,6 +858,17 @@ void cmTarget::SetHaveInstallRule(bool hir) impl->HaveInstallRule = hir; } +void cmTarget::AddInstallGenerator(cmInstallTargetGenerator* g) +{ + impl->InstallGenerators.emplace_back(g); +} + +std::vector<cmInstallTargetGenerator*> const& cmTarget::GetInstallGenerators() + const +{ + return impl->InstallGenerators; +} + bool cmTarget::GetIsGeneratorProvided() const { return impl->IsGeneratorProvided; |