Skip to content

[Xcodeproj] conditionally add default linker path #645

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 12, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions Sources/Xcodeproj/Module+PBXProj.swift
Original file line number Diff line number Diff line change
Expand Up @@ -219,11 +219,13 @@ extension Module {
var buildSettings = [String: Any]()
let plistPath = xcodeProjectPath.appending(component: infoPlistFileName)

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

if isTest {
buildSettings["EMBEDDED_CONTENT_CONTAINS_SWIFT"] = "YES"
Expand Down