summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalXCodeGenerator.cxx
diff options
context:
space:
mode:
authorMarc Chevrier <marc.chevrier@gmail.com>2022-09-14 16:52:10 (GMT)
committerBrad King <brad.king@kitware.com>2022-09-14 18:55:27 (GMT)
commitfc06450ff49db8ebf86977b85206c75de4a40ed3 (patch)
tree0290d6bc1528c72a1496a7589e3df3820e7cad4b /Source/cmGlobalXCodeGenerator.cxx
parent31f835410efeea50acd43512eb9e5646a26ea177 (diff)
downloadCMake-fc06450ff49db8ebf86977b85206c75de4a40ed3.zip
CMake-fc06450ff49db8ebf86977b85206c75de4a40ed3.tar.gz
CMake-fc06450ff49db8ebf86977b85206c75de4a40ed3.tar.bz2
Apple: Fix regression when linking a framework with postfix
Fix a regression caused by commit 40178f3c90 (cmGlobalGenerator: Add helper to split framework path, 2022-02-10, v3.24.0-rc1~661^2~1). Fixes: #23961
Diffstat (limited to 'Source/cmGlobalXCodeGenerator.cxx')
-rw-r--r--Source/cmGlobalXCodeGenerator.cxx14
1 files changed, 11 insertions, 3 deletions
diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx
index b9bbb67..433edaf 100644
--- a/Source/cmGlobalXCodeGenerator.cxx
+++ b/Source/cmGlobalXCodeGenerator.cxx
@@ -3813,9 +3813,17 @@ void cmGlobalXCodeGenerator::AddDependAndLinkInformation(cmXCodeObject* target)
// an implicit search path, so we need it
libPaths.Add("-F " + this->XCodeEscapePath(fwItems->first));
}
- libPaths.Add(
- libName.GetFormattedItem(this->XCodeEscapePath(fwItems->second))
- .Value);
+ if (libName.GetFeatureName() == "__CMAKE_LINK_FRAMEWORK"_s) {
+ // use the full path
+ libPaths.Add(
+ libName.GetFormattedItem(this->XCodeEscapePath(cleanPath))
+ .Value);
+ } else {
+ libPaths.Add(
+ libName
+ .GetFormattedItem(this->XCodeEscapePath(fwItems->second))
+ .Value);
+ }
} else {
libPaths.Add(
libName.GetFormattedItem(this->XCodeEscapePath(cleanPath))