Skip to content

Commit a0829b3

Browse files
authored
Merge pull request #645 from aciidb0mb3r/fix-default-linker-path
[Xcodeproj] conditionally add default linker path
2 parents eed742c + d0d0a57 commit a0829b3

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Sources/Xcodeproj/Module+PBXProj.swift

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -219,11 +219,13 @@ extension Module {
219219
var buildSettings = [String: Any]()
220220
let plistPath = xcodeProjectPath.appending(component: infoPlistFileName)
221221

222-
// Add default library search path to the directory where symlinks to framework
222+
// Add default library search path to the directory where symlinks to C target framework
223223
// binaries will be put with name `lib<library-name>.dylib` so that autolinking
224224
// can proceed without providing another modulemap for Xcode projects.
225225
// See: https://bugs.swift.org/browse/SR-2465
226-
buildSettings["LIBRARY_SEARCH_PATHS"] = ["$(PROJECT_TEMP_DIR)/SymlinkLibs/"]
226+
if recursiveDependencies.first(where: { $0 is ClangModule }) != nil {
227+
buildSettings["LIBRARY_SEARCH_PATHS"] = ["$(PROJECT_TEMP_DIR)/SymlinkLibs/"]
228+
}
227229

228230
if isTest {
229231
buildSettings["EMBEDDED_CONTENT_CONTAINS_SWIFT"] = "YES"

0 commit comments

Comments
 (0)