summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2023-12-19 13:03:41 (GMT)
committerKitware Robot <kwrobot@kitware.com>2023-12-19 13:04:01 (GMT)
commit49dc6a44e0602e6a70c0466d789476c8b12fe509 (patch)
tree539e424cae3b245ea5852e6775ee4ea70c61cecf /Source
parent2cad910ecb39cf19367b89a5489c634ae5ac3375 (diff)
parentdefbfd6f55b2f2fdbb37e6f88867dfaac9180531 (diff)
downloadCMake-49dc6a44e0602e6a70c0466d789476c8b12fe509.zip
CMake-49dc6a44e0602e6a70c0466d789476c8b12fe509.tar.gz
CMake-49dc6a44e0602e6a70c0466d789476c8b12fe509.tar.bz2
Merge topic 'Xcode-Check-Imported-Framework'
defbfd6f55 Xcode: Restore support for standalone IMPORTED_LOCATION_<CONFIG> Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !9082
Diffstat (limited to 'Source')
-rw-r--r--Source/cmGeneratorTarget.cxx22
1 files changed, 17 insertions, 5 deletions
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx
index feeae95..289bb24 100644
--- a/Source/cmGeneratorTarget.cxx
+++ b/Source/cmGeneratorTarget.cxx
@@ -8860,11 +8860,23 @@ bool cmGeneratorTarget::IsFrameworkOnApple() const
bool cmGeneratorTarget::IsImportedFrameworkFolderOnApple(
const std::string& config) const
{
- return this->IsApple() && this->IsImported() &&
- (this->GetType() == cmStateEnums::STATIC_LIBRARY ||
- this->GetType() == cmStateEnums::SHARED_LIBRARY ||
- this->GetType() == cmStateEnums::UNKNOWN_LIBRARY) &&
- cmSystemTools::IsPathToFramework(this->GetLocation(config));
+ if (this->IsApple() && this->IsImported() &&
+ (this->GetType() == cmStateEnums::STATIC_LIBRARY ||
+ this->GetType() == cmStateEnums::SHARED_LIBRARY ||
+ this->GetType() == cmStateEnums::UNKNOWN_LIBRARY)) {
+ std::string cfg = config;
+ if (cfg.empty() && this->GetGlobalGenerator()->IsXcode()) {
+ // FIXME(#25515): Remove the need for this workaround.
+ // The Xcode generator queries include directories without any
+ // specific configuration. Pick one in case this target does
+ // not set either IMPORTED_LOCATION or IMPORTED_CONFIGURATIONS.
+ cfg =
+ this->Makefile->GetGeneratorConfigs(cmMakefile::IncludeEmptyConfig)[0];
+ }
+ return cmSystemTools::IsPathToFramework(this->GetLocation(cfg));
+ }
+
+ return false;
}
bool cmGeneratorTarget::IsAppBundleOnApple() const