diff options
author | Brad King <brad.king@kitware.com> | 2022-10-17 14:03:49 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2022-10-17 14:03:58 (GMT) |
commit | d72912cac2960733743793fed72ad7b732df0b7f (patch) | |
tree | 6827bf58602ebb4dad53351bf0831a54e6087f38 /Source/cmGlobalXCodeGenerator.cxx | |
parent | 74fe88fab28daf8aee771ff64329034021ca16b5 (diff) | |
parent | 4aa86da82798ed5d741e0204ce3c9f59aa697956 (diff) | |
download | CMake-d72912cac2960733743793fed72ad7b732df0b7f.zip CMake-d72912cac2960733743793fed72ad7b732df0b7f.tar.gz CMake-d72912cac2960733743793fed72ad7b732df0b7f.tar.bz2 |
Merge topic 'xcode-framework-consumption'
4aa86da827 Xcode: ensure framework with custom output directory can be consumed
Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Jason Juang <jasjuang@gmail.com>
Merge-request: !7791
Diffstat (limited to 'Source/cmGlobalXCodeGenerator.cxx')
-rw-r--r-- | Source/cmGlobalXCodeGenerator.cxx | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx index 6b867d4..a1af268 100644 --- a/Source/cmGlobalXCodeGenerator.cxx +++ b/Source/cmGlobalXCodeGenerator.cxx @@ -3830,6 +3830,7 @@ void cmGlobalXCodeGenerator::AddDependAndLinkInformation(cmXCodeObject* target) const auto& fwPaths = cli->GetFrameworkPaths(); emitted.insert(fwPaths.begin(), fwPaths.end()); BuildObjectListOrString libPaths(this, true); + BuildObjectListOrString fwSearchPaths(this, true); for (auto const& libItem : configItemMap[configName]) { auto const& libName = *libItem; if (libName.IsPath == cmComputeLinkInformation::ItemIsPath::Yes) { @@ -3846,8 +3847,8 @@ void cmGlobalXCodeGenerator::AddDependAndLinkInformation(cmXCodeObject* target) emitted.insert(fwDescriptor->Directory).second) { // This is a search path we had not added before and it isn't // an implicit search path, so we need it - libPaths.Add("-F " + - this->XCodeEscapePath(fwDescriptor->Directory)); + fwSearchPaths.Add( + this->XCodeEscapePath(fwDescriptor->Directory)); } if (libName.GetFeatureName() == "__CMAKE_LINK_FRAMEWORK"_s) { // use the full path @@ -3886,9 +3887,16 @@ void cmGlobalXCodeGenerator::AddDependAndLinkInformation(cmXCodeObject* target) target->AddDependTarget(configName, libName.Target->GetName()); } } - this->AppendBuildSettingAttribute(target, - this->GetTargetLinkFlagsVar(gt), - libPaths.CreateList(), configName); + if (!libPaths.IsEmpty()) { + this->AppendBuildSettingAttribute(target, + this->GetTargetLinkFlagsVar(gt), + libPaths.CreateList(), configName); + } + if (!fwSearchPaths.IsEmpty()) { + this->AppendBuildSettingAttribute(target, "FRAMEWORK_SEARCH_PATHS", + fwSearchPaths.CreateList(), + configName); + } } } } |