summaryrefslogtreecommitdiff
path: root/Source/cmComputeLinkInformation.cxx
diff options
context:
space:
mode:
authorGusts Kaksis <gusts.kaksis@sonarworks.com>2020-09-28 21:16:52 +0300
committerCraig Scott <craig.scott@crascit.com>2020-10-02 22:13:00 +1000
commitce2dee9e5bae37c8117087bb83add075c3c123b4 (patch)
tree51a3e6d9194afd96bbc2e6dbbe9b8a9fd3e7057a /Source/cmComputeLinkInformation.cxx
parent468bcc3291ac3f325b401046b2465d634d8e3947 (diff)
downloadcmake-ce2dee9e5bae37c8117087bb83add075c3c123b4.tar.gz
Xcode: Don't add framework as -framework argument in linker info list
Diffstat (limited to 'Source/cmComputeLinkInformation.cxx')
-rw-r--r--Source/cmComputeLinkInformation.cxx16
1 files changed, 11 insertions, 5 deletions
diff --git a/Source/cmComputeLinkInformation.cxx b/Source/cmComputeLinkInformation.cxx
index 4a331fb86d..201a9d9bf6 100644
--- a/Source/cmComputeLinkInformation.cxx
+++ b/Source/cmComputeLinkInformation.cxx
@@ -1293,11 +1293,17 @@ void cmComputeLinkInformation::AddFrameworkItem(std::string const& item)
// add runtime information
this->AddLibraryRuntimeInfo(full_fw);
- // Add the item using the -framework option.
- this->Items.emplace_back(std::string("-framework"), false);
- cmOutputConverter converter(this->Makefile->GetStateSnapshot());
- fw = converter.EscapeForShell(fw);
- this->Items.emplace_back(fw, false);
+ if (this->GlobalGenerator->IsXcode()) {
+ // Add framework path - it will be handled by Xcode after it's added to
+ // "Link Binary With Libraries" build phase
+ this->Items.emplace_back(item, true);
+ } else {
+ // Add the item using the -framework option.
+ this->Items.emplace_back(std::string("-framework"), false);
+ cmOutputConverter converter(this->Makefile->GetStateSnapshot());
+ fw = converter.EscapeForShell(fw);
+ this->Items.emplace_back(fw, false);
+ }
}
void cmComputeLinkInformation::AddDirectoryItem(std::string const& item)