diff options
author | Gusts Kaksis <gusts.kaksis@sonarworks.com> | 2020-09-28 18:16:52 (GMT) |
---|---|---|
committer | Craig Scott <craig.scott@crascit.com> | 2020-10-02 12:13:00 (GMT) |
commit | ce2dee9e5bae37c8117087bb83add075c3c123b4 (patch) | |
tree | 51a3e6d9194afd96bbc2e6dbbe9b8a9fd3e7057a /Source/cmComputeLinkInformation.cxx | |
parent | 468bcc3291ac3f325b401046b2465d634d8e3947 (diff) | |
download | CMake-ce2dee9e5bae37c8117087bb83add075c3c123b4.zip CMake-ce2dee9e5bae37c8117087bb83add075c3c123b4.tar.gz CMake-ce2dee9e5bae37c8117087bb83add075c3c123b4.tar.bz2 |
Xcode: Don't add framework as -framework argument in linker info list
Diffstat (limited to 'Source/cmComputeLinkInformation.cxx')
-rw-r--r-- | Source/cmComputeLinkInformation.cxx | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/Source/cmComputeLinkInformation.cxx b/Source/cmComputeLinkInformation.cxx index 4a331fb..201a9d9 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) |