Skip to content
This repository has been archived by the owner on Nov 10, 2023. It is now read-only.

[apple] add apple.add_root_user_header_search_path_in_xcode. #2602

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
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
4 changes: 4 additions & 0 deletions src/com/facebook/buck/apple/AppleConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,10 @@ public boolean shouldGenerateMissingUmbrellaHeaders() {
return delegate.getBooleanValue(APPLE_SECTION, "generate_missing_umbrella_headers", false);
}

public boolean shouldAddRootUserHeaderSearchPathInXcodeProject() {
return delegate.getBooleanValue(APPLE_SECTION, "add_root_user_header_search_path_in_xcode", false);
}

public boolean shouldUseSwiftDelegate() {
// TODO(mgd): Remove Swift delegation from Apple rules
return delegate.getBooleanValue(APPLE_SECTION, "use_swift_delegate", true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -538,7 +538,13 @@ public void createXcodeProjects() throws IOException {
.getBuildConfigurationList()
.getBuildConfigurationsByName()
.getUnchecked(configName);
outputConfig.setBuildSettings(new NSDictionary());
NSDictionary settings = new NSDictionary();
if (appleConfig.shouldAddRootUserHeaderSearchPathInXcodeProject()) {
settings.put("ALWAYS_SEARCH_USER_PATHS", "NO");
settings.put("USER_HEADER_SEARCH_PATHS",
projectFilesystem.getRootPath().toString());
}
outputConfig.setBuildSettings(settings);
}

if (!options.shouldGenerateHeaderSymlinkTreesOnly()) {
Expand Down