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/cmGlobalXCodeGenerator.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/cmGlobalXCodeGenerator.cxx')
-rw-r--r-- | Source/cmGlobalXCodeGenerator.cxx | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx index acae2b6..f1a1ce6 100644 --- a/Source/cmGlobalXCodeGenerator.cxx +++ b/Source/cmGlobalXCodeGenerator.cxx @@ -3579,8 +3579,16 @@ void cmGlobalXCodeGenerator::AddDependAndLinkInformation(cmXCodeObject* target) for (auto const& libItem : configItemMap[configName]) { auto const& libName = *libItem; if (libName.IsPath) { - libPaths.Add(this->XCodeEscapePath(libName.Value.Value)); const auto libPath = GetLibraryOrFrameworkPath(libName.Value.Value); + if (cmSystemTools::StringEndsWith(libPath.c_str(), ".framework")) { + const auto fwName = + cmSystemTools::GetFilenameWithoutExtension(libPath); + const auto fwDir = cmSystemTools::GetParentDirectory(libPath); + libPaths.Add("-F " + this->XCodeEscapePath(fwDir)); + libPaths.Add("-framework " + fwName); + } else { + libPaths.Add(this->XCodeEscapePath(libName.Value.Value)); + } if ((!libName.Target || libName.Target->IsImported()) && IsLinkPhaseLibraryExtension(libPath)) { // Create file reference for embedding |