summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2022-10-27 14:28:15 (GMT)
committerBrad King <brad.king@kitware.com>2022-10-27 14:28:39 (GMT)
commit8d5631f0d0cc96850011ebdd05ede2d8de477405 (patch)
treea7c155d4d552ee6f7615d169641bcb1333b598e3 /Source
parent33d610a07695ca4716e376d7411845ccd894c6c0 (diff)
downloadCMake-8d5631f0d0cc96850011ebdd05ede2d8de477405.zip
CMake-8d5631f0d0cc96850011ebdd05ede2d8de477405.tar.gz
CMake-8d5631f0d0cc96850011ebdd05ede2d8de477405.tar.bz2
Xcode: Revert "Don't set INSTALL_PATH unless target is SHARED_LIBRARY"
The change in commit 61acaa12af (xcode: Don't set INSTALL_PATH unless target is SHARED_LIBRARY, 2022-07-14, v3.25.0-rc1~291^2) breaks some existing use cases. Revert it pending further investigation. Fixes: #24087 Issue: #15183
Diffstat (limited to 'Source')
-rw-r--r--Source/cmGlobalXCodeGenerator.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx
index 6328d29..dd470f8 100644
--- a/Source/cmGlobalXCodeGenerator.cxx
+++ b/Source/cmGlobalXCodeGenerator.cxx
@@ -2915,8 +2915,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.
@@ -2938,9 +2938,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);