diff options
author | Brad King <brad.king@kitware.com> | 2020-10-28 11:26:40 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2020-10-28 11:26:46 (GMT) |
commit | 15caa11da54a632a83e9112dc9ce4f39945639c8 (patch) | |
tree | dfc1b0989cc36b83d41858ac0abfef17012edf2c /Source | |
parent | b79aadbfd41441c6a863da77cfa0f83cfaa31449 (diff) | |
parent | 5dc23300b1c320db1e0690f769c4fda11adc6376 (diff) | |
download | CMake-15caa11da54a632a83e9112dc9ce4f39945639c8.zip CMake-15caa11da54a632a83e9112dc9ce4f39945639c8.tar.gz CMake-15caa11da54a632a83e9112dc9ce4f39945639c8.tar.bz2 |
Merge topic 'xcode-fix-source-linking' into release-3.19
5dc23300b1 Xcode: Fix regression that automatically links libraries in source list
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5432
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmGlobalXCodeGenerator.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx index 952a179..e7bbf72 100644 --- a/Source/cmGlobalXCodeGenerator.cxx +++ b/Source/cmGlobalXCodeGenerator.cxx @@ -1423,7 +1423,7 @@ bool cmGlobalXCodeGenerator::CreateXCodeTarget( cmGeneratorTarget::SourceFileFlags tsFlags = gtgt->GetTargetSourceFileFlags(sourceFile); - if (filetype && IsLibraryType(filetype->GetString())) { + if (filetype && filetype->GetString() == "compiled.mach-o.objfile") { if (sourceFile->GetObjectLibrary().empty()) { externalObjFiles.push_back(xsf); } @@ -1591,7 +1591,7 @@ bool cmGlobalXCodeGenerator::CreateXCodeTarget( } } - // always create framework build phase + // Always create Link Binary With Libraries build phase cmXCodeObject* frameworkBuildPhase = nullptr; frameworkBuildPhase = this->CreateObject(cmXCodeObject::PBXFrameworksBuildPhase); @@ -1600,6 +1600,7 @@ bool cmGlobalXCodeGenerator::CreateXCodeTarget( this->CreateString("2147483647")); buildFiles = this->CreateObject(cmXCodeObject::OBJECT_LIST); frameworkBuildPhase->AddAttribute("files", buildFiles); + // Add all collected .o files to this build phase for (auto& externalObjFile : externalObjFiles) { buildFiles->AddObject(externalObjFile); } |