summaryrefslogtreecommitdiffstats
path: root/Source/cmTarget.h
diff options
context:
space:
mode:
authorEugene Shalygin <eugene.shalygin@gmail.com>2022-02-09 17:09:04 (GMT)
committerBrad King <brad.king@kitware.com>2022-02-09 18:31:26 (GMT)
commit83d79636bff4963f16215b219c5941618a58c7bd (patch)
tree5f021837afb1f65cefa4bd4433c61464f15b80e0 /Source/cmTarget.h
parentb91c4dfb758beecf796d6e455621c36602d2ec7d (diff)
downloadCMake-83d79636bff4963f16215b219c5941618a58c7bd.zip
CMake-83d79636bff4963f16215b219c5941618a58c7bd.tar.gz
CMake-83d79636bff4963f16215b219c5941618a58c7bd.tar.bz2
install(TARGETS): Restore per-export INCLUDES DESTINATION
In commit 55e4753bbb (Refactor cmTargetExport removing InterfaceIncludeDirecories, 2021-07-20, v3.22.0-rc1~337^2~1) the storage of `INCLUDES DESTINATION` was moved into each target. However, a target may be installed in multiple exports, and their `INCLUDES DESTINATION` should not be mixed. Convert the IncludeDirectoriesEntries vector to a map and modify access function to store the directories lists with respect to cmExportTarget object. This fixes error when the same target is exported more than once via different exports and each for consequent export its include directories list grows. Add a test for this case. Fixes: #23183
Diffstat (limited to 'Source/cmTarget.h')
-rw-r--r--Source/cmTarget.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/Source/cmTarget.h b/Source/cmTarget.h
index 3cf6942..95aa4d3 100644
--- a/Source/cmTarget.h
+++ b/Source/cmTarget.h
@@ -26,6 +26,7 @@ class cmMakefile;
class cmMessenger;
class cmPropertyMap;
class cmSourceFile;
+class cmTargetExport;
class cmTargetInternals;
/** \class cmTarget
@@ -232,8 +233,10 @@ public:
void AddSystemIncludeDirectories(std::set<std::string> const& incs);
std::set<std::string> const& GetSystemIncludeDirectories() const;
- void AddInstallIncludeDirectories(cmStringRange const& incs);
- cmStringRange GetInstallIncludeDirectoriesEntries() const;
+ void AddInstallIncludeDirectories(cmTargetExport const& te,
+ cmStringRange const& incs);
+ cmStringRange GetInstallIncludeDirectoriesEntries(
+ cmTargetExport const& te) const;
BTs<std::string> const* GetLanguageStandardProperty(
const std::string& propertyName) const;