summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2022-08-17 12:41:25 (GMT)
committerKitware Robot <kwrobot@kitware.com>2022-08-17 12:41:33 (GMT)
commitb0ab42c120120f36c4ed315a05df9e8ea9c8ecf2 (patch)
treeb0809387c48a96233fb8bdb9fe5f2e28c4f3203c
parent49d5cee04d705417214d3c39e79159e94bc75c35 (diff)
parent61acaa12af7952f6eaae77b98f2c21630dc2d64d (diff)
downloadCMake-b0ab42c120120f36c4ed315a05df9e8ea9c8ecf2.zip
CMake-b0ab42c120120f36c4ed315a05df9e8ea9c8ecf2.tar.gz
CMake-b0ab42c120120f36c4ed315a05df9e8ea9c8ecf2.tar.bz2
Merge topic 'fix-xcode-install-path'
61acaa12af xcode: Don't set INSTALL_PATH unless target is SHARED_LIBRARY Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !7473
-rw-r--r--Source/cmGlobalXCodeGenerator.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx
index 70a379e..7523662 100644
--- a/Source/cmGlobalXCodeGenerator.cxx
+++ b/Source/cmGlobalXCodeGenerator.cxx
@@ -2894,8 +2894,8 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmGeneratorTarget* gtgt,
}
// Create the INSTALL_PATH attribute.
- std::string install_name_dir;
if (gtgt->GetType() == cmStateEnums::SHARED_LIBRARY) {
+ std::string install_name_dir;
// Get the install_name directory for the build tree.
install_name_dir = gtgt->GetInstallNameDirForBuildTree(configName);
// Xcode doesn't create the correct install_name in some cases.
@@ -2917,9 +2917,9 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmGeneratorTarget* gtgt,
extraLinkOptions += " -install_name ";
extraLinkOptions += XCodeEscapePath(install_name);
}
+ buildSettings->AddAttribute("INSTALL_PATH",
+ this->CreateString(install_name_dir));
}
- buildSettings->AddAttribute("INSTALL_PATH",
- this->CreateString(install_name_dir));
// Create the LD_RUNPATH_SEARCH_PATHS
cmComputeLinkInformation* pcli = gtgt->GetLinkInformation(configName);