summaryrefslogtreecommitdiff
path: root/Source/cmInstallCommand.cxx
diff options
context:
space:
mode:
authorDongHun Kwak <dh0128.kwak@samsung.com>2021-10-08 09:20:29 +0900
committerDongHun Kwak <dh0128.kwak@samsung.com>2021-10-08 09:20:29 +0900
commite2f5ee91b89a80c7801baf3870845d7fe54b3dd7 (patch)
treecc05a38068e6be9a648de142c12aea86066a97fd /Source/cmInstallCommand.cxx
parentf7fbee1ce7e4f73a5a46681cf010a9ac85c3ad87 (diff)
downloadcmake-e2f5ee91b89a80c7801baf3870845d7fe54b3dd7.tar.gz
cmake-e2f5ee91b89a80c7801baf3870845d7fe54b3dd7.tar.bz2
cmake-e2f5ee91b89a80c7801baf3870845d7fe54b3dd7.zip
Imported Upstream version 3.19.2upstream/3.19.2
Diffstat (limited to 'Source/cmInstallCommand.cxx')
-rw-r--r--Source/cmInstallCommand.cxx19
1 files changed, 11 insertions, 8 deletions
diff --git a/Source/cmInstallCommand.cxx b/Source/cmInstallCommand.cxx
index b99e6a3c6..ff08ee41e 100644
--- a/Source/cmInstallCommand.cxx
+++ b/Source/cmInstallCommand.cxx
@@ -461,6 +461,13 @@ bool HandleTargetsMode(std::vector<std::string> const& args,
std::unique_ptr<cmInstallFilesGenerator> publicHeaderGenerator;
std::unique_ptr<cmInstallFilesGenerator> resourceGenerator;
+ // Avoid selecting default destinations for PUBLIC_HEADER and
+ // PRIVATE_HEADER if any artifacts are specified.
+ bool artifactsSpecified = false;
+
+ // Track whether this is a namelink-only rule.
+ bool namelinkOnly = false;
+
auto addTargetExport = [&]() {
// Add this install rule to an export if one was specified.
if (!exports.empty()) {
@@ -475,20 +482,13 @@ bool HandleTargetsMode(std::vector<std::string> const& args,
te->ObjectsGenerator = objectGenerator.get();
te->InterfaceIncludeDirectories =
cmJoin(includesArgs.GetIncludeDirs(), ";");
-
+ te->NamelinkOnly = namelinkOnly;
helper.Makefile->GetGlobalGenerator()
->GetExportSets()[exports]
.AddTargetExport(std::move(te));
}
};
- // Avoid selecting default destinations for PUBLIC_HEADER and
- // PRIVATE_HEADER if any artifacts are specified.
- bool artifactsSpecified = false;
-
- // Track whether this is a namelink-only rule.
- bool namelinkOnly = false;
-
switch (target.GetType()) {
case cmStateEnums::SHARED_LIBRARY: {
// Shared libraries are handled differently on DLL and non-DLL
@@ -497,6 +497,7 @@ bool HandleTargetsMode(std::vector<std::string> const& args,
if (target.IsDLLPlatform()) {
// When in namelink only mode skip all libraries on Windows.
if (namelinkMode == cmInstallTargetGenerator::NamelinkModeOnly) {
+ namelinkOnly = true;
addTargetExport();
continue;
}
@@ -529,6 +530,7 @@ bool HandleTargetsMode(std::vector<std::string> const& args,
if (target.IsFrameworkOnApple()) {
// When in namelink only mode skip frameworks.
if (namelinkMode == cmInstallTargetGenerator::NamelinkModeOnly) {
+ namelinkOnly = true;
addTargetExport();
continue;
}
@@ -574,6 +576,7 @@ bool HandleTargetsMode(std::vector<std::string> const& args,
if (target.IsFrameworkOnApple()) {
// When in namelink only mode skip frameworks.
if (namelinkMode == cmInstallTargetGenerator::NamelinkModeOnly) {
+ namelinkOnly = true;
addTargetExport();
continue;
}