Merge pull request #1337 from baconpaul/macosx-deployment-1336

On OSX, convert systemversion to MACOSX_DEPLOYMENT_TARGET
This commit is contained in:
Samuel Surtees 2019-09-22 22:23:56 +10:00 committed by GitHub
commit e5e4f382e2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 48 additions and 0 deletions

View File

@ -1738,6 +1738,49 @@
]]
end
function suite.XCBuildConfigurationTarget_OnOSXMinVersion()
_TARGET_OS = "macosx"
systemversion "10.11"
prepare()
xcode.XCBuildConfiguration_Target(tr, tr.products.children[1], tr.configs[1])
test.capture [[
FDC4CBFB4635B02D8AD4823B /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CONFIGURATION_BUILD_DIR = bin/Debug;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
GCC_DYNAMIC_NO_PIC = NO;
INSTALL_PATH = /usr/local/bin;
MACOSX_DEPLOYMENT_TARGET = 10.11;
PRODUCT_NAME = MyProject;
};
name = Debug;
};
]]
end
function suite.XCBuildConfigurationTarget_OnOSXUnSpecificedVersion()
_TARGET_OS = "macosx"
-- systemversion "10.11"
prepare()
xcode.XCBuildConfiguration_Target(tr, tr.products.children[1], tr.configs[1])
test.capture [[
FDC4CBFB4635B02D8AD4823B /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CONFIGURATION_BUILD_DIR = bin/Debug;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
GCC_DYNAMIC_NO_PIC = NO;
INSTALL_PATH = /usr/local/bin;
PRODUCT_NAME = MyProject;
};
name = Debug;
};
]]
end
function suite.XCBuildConfigurationTarget_OnInfoPlist()
files { "./a/b/c/MyProject-Info.plist" }

View File

@ -1233,6 +1233,11 @@
if family then
settings['TARGETED_DEVICE_FAMILY'] = family
end
else
local minOSVersion = project.systemversion(cfg)
if minOSVersion ~= nil then
settings['MACOSX_DEPLOYMENT_TARGET'] = minOSVersion
end
end
--ms not by default ...add it manually if you need it