Skip to content
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

Xcode improvements #1540

Merged
merged 2 commits into from
Oct 30, 2020
Merged
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
40 changes: 36 additions & 4 deletions modules/xcode/tests/test_xcode_project.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2255,15 +2255,15 @@
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
HEADER_SEARCH_PATHS = (
OBJROOT = obj/Debug;
ONLY_ACTIVE_ARCH = NO;
SYMROOT = bin/Debug;
SYSTEM_HEADER_SEARCH_PATHS = (
../include,
../libs,
"\"../name with spaces\"",
"$(inherited)",
);
OBJROOT = obj/Debug;
ONLY_ACTIVE_ARCH = NO;
SYMROOT = bin/Debug;
};
name = Debug;
};
Expand Down Expand Up @@ -2781,6 +2781,38 @@
end


function suite.XCBuildConfigurationProject_OnSysLibDirs()
libdirs { "mylibs1", "mylibs2" }
syslibdirs { "mysyslib3", "mysyslib4" }
prepare()
xcode.XCBuildConfiguration_Project(tr, tr.configs[1])
test.capture [[
A14350AC4595EE5E57CE36EC /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ARCHS = "$(NATIVE_ARCH_ACTUAL)";
CONFIGURATION_BUILD_DIR = "$(SYMROOT)";
CONFIGURATION_TEMP_DIR = "$(OBJROOT)";
GCC_OPTIMIZATION_LEVEL = 0;
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
LIBRARY_SEARCH_PATHS = (
mylibs1,
mylibs2,
mysyslib3,
mysyslib4,
);
OBJROOT = obj/Debug;
ONLY_ACTIVE_ARCH = NO;
SYMROOT = bin/Debug;
};
name = Debug;
};
]]
end


function suite.XCBuildConfigurationProject_OnPCH()
pchheader "MyProject_Prefix.pch"
prepare()
Expand Down
7 changes: 5 additions & 2 deletions modules/xcode/xcode_common.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1370,12 +1370,15 @@
if not table.isempty(cfg.sysincludedirs) then
table.insert(cfg.sysincludedirs, "$(inherited)")
end
settings['HEADER_SEARCH_PATHS'] = cfg.sysincludedirs
settings['SYSTEM_HEADER_SEARCH_PATHS'] = cfg.sysincludedirs

for i,v in ipairs(cfg.libdirs) do
cfg.libdirs[i] = p.project.getrelative(cfg.project, cfg.libdirs[i])
end
settings['LIBRARY_SEARCH_PATHS'] = cfg.libdirs
for i,v in ipairs(cfg.syslibdirs) do
cfg.syslibdirs[i] = p.project.getrelative(cfg.project, cfg.syslibdirs[i])
end
settings['LIBRARY_SEARCH_PATHS'] = table.join (cfg.libdirs, cfg.syslibdirs)

for i,v in ipairs(cfg.frameworkdirs) do
cfg.frameworkdirs[i] = p.project.getrelative(cfg.project, cfg.frameworkdirs[i])
Expand Down