Merge remote-tracking branch 'core/master' into fix-mergeFilters

This commit is contained in:
Thomas Desveaux 2017-09-06 15:01:05 +02:00
commit 725b76943f
9 changed files with 161 additions and 1 deletions

View File

@ -23,6 +23,22 @@
kind = "list", kind = "list",
} }
p.api.register {
name = "xcodecodesigningidentity",
scope = "config",
kind = "string",
}
p.api.register {
name = "iosfamily",
scope = "config",
kind = "string",
allowed = {
"iPhone/iPod touch",
"iPad",
"Universal",
}
}
-- --
-- Register the Xcode exporters. -- Register the Xcode exporters.
@ -35,7 +51,6 @@
-- Xcode always uses Mac OS X path and naming conventions -- Xcode always uses Mac OS X path and naming conventions
targetos = "macosx",
toolset = "clang", toolset = "clang",
-- The capabilities of this action -- The capabilities of this action

View File

@ -17,6 +17,7 @@
local wks local wks
function suite.setup() function suite.setup()
_TARGET_OS = "macosx"
p.action.set('xcode4') p.action.set('xcode4')
wks = test.createWorkspace() wks = test.createWorkspace()
end end

View File

@ -49,6 +49,7 @@
end end
function suite.setup() function suite.setup()
_TARGET_OS = "macosx"
p.action.set('xcode4') p.action.set('xcode4')
io.eol = "\n" io.eol = "\n"
xcode.used_ids = { } -- reset the list of generated IDs xcode.used_ids = { } -- reset the list of generated IDs

View File

@ -18,6 +18,7 @@
local wks, prj local wks, prj
function suite.setup() function suite.setup()
_TARGET_OS = "macosx"
p.action.set('xcode4') p.action.set('xcode4')
wks = test.createWorkspace() wks = test.createWorkspace()
end end

View File

@ -23,6 +23,7 @@
end end
function suite.setup() function suite.setup()
_TARGET_OS = "macosx"
p.action.set('xcode4') p.action.set('xcode4')
xcode.used_ids = { } -- reset the list of generated IDs xcode.used_ids = { } -- reset the list of generated IDs

View File

@ -20,6 +20,7 @@
end end
function suite.setup() function suite.setup()
_TARGET_OS = "macosx"
p.action.set('xcode4') p.action.set('xcode4')
p.eol("\n") p.eol("\n")
xcode.used_ids = { } -- reset the list of generated IDs xcode.used_ids = { } -- reset the list of generated IDs
@ -1095,6 +1096,123 @@
]] ]]
end end
function suite.XCBuildConfigurationTarget_OnIOS()
_TARGET_OS = "ios"
prepare()
xcode.XCBuildConfiguration_Target(tr, tr.products.children[1], tr.configs[1])
test.capture [[
[MyProject:Debug] /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CONFIGURATION_BUILD_DIR = bin/Debug;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
GCC_DYNAMIC_NO_PIC = NO;
INSTALL_PATH = /usr/local/bin;
PRODUCT_NAME = MyProject;
SDKROOT = iphoneos;
};
name = Debug;
};
]]
end
function suite.XCBuildConfigurationTarget_OnIOSMinVersion()
_TARGET_OS = "ios"
systemversion "8.3"
prepare()
xcode.XCBuildConfiguration_Target(tr, tr.products.children[1], tr.configs[1])
test.capture [[
[MyProject:Debug] /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CONFIGURATION_BUILD_DIR = bin/Debug;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
GCC_DYNAMIC_NO_PIC = NO;
INSTALL_PATH = /usr/local/bin;
IPHONEOS_DEPLOYMENT_TARGET = 8.3;
PRODUCT_NAME = MyProject;
SDKROOT = iphoneos;
};
name = Debug;
};
]]
end
function suite.XCBuildConfigurationTarget_OnIOSMinMaxVersion()
_TARGET_OS = "ios"
systemversion "8.3:9.1"
prepare()
xcode.XCBuildConfiguration_Target(tr, tr.products.children[1], tr.configs[1])
test.capture [[
[MyProject:Debug] /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CONFIGURATION_BUILD_DIR = bin/Debug;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
GCC_DYNAMIC_NO_PIC = NO;
INSTALL_PATH = /usr/local/bin;
IPHONEOS_DEPLOYMENT_TARGET = 8.3;
PRODUCT_NAME = MyProject;
SDKROOT = iphoneos;
};
name = Debug;
};
]]
end
function suite.XCBuildConfigurationTarget_OnIOSCodeSigningIdentity()
_TARGET_OS = "ios"
xcodecodesigningidentity "Premake Developers"
prepare()
xcode.XCBuildConfiguration_Target(tr, tr.products.children[1], tr.configs[1])
test.capture [[
[MyProject:Debug] /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "Premake Developers";
CONFIGURATION_BUILD_DIR = bin/Debug;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
GCC_DYNAMIC_NO_PIC = NO;
INSTALL_PATH = /usr/local/bin;
PRODUCT_NAME = MyProject;
SDKROOT = iphoneos;
};
name = Debug;
};
]]
end
function suite.XCBuildConfigurationTarget_OnIOSFamily()
_TARGET_OS = "ios"
iosfamily "Universal"
prepare()
xcode.XCBuildConfiguration_Target(tr, tr.products.children[1], tr.configs[1])
test.capture [[
[MyProject:Debug] /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CONFIGURATION_BUILD_DIR = bin/Debug;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
GCC_DYNAMIC_NO_PIC = NO;
INSTALL_PATH = /usr/local/bin;
PRODUCT_NAME = MyProject;
SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Debug;
};
]]
end
--------------------------------------------------------------------------- ---------------------------------------------------------------------------
-- XCBuildConfiguration_Project tests -- XCBuildConfiguration_Project tests

View File

@ -943,6 +943,27 @@
settings['EXCLUDED_SOURCE_FILE_NAMES'] = fileNameList settings['EXCLUDED_SOURCE_FILE_NAMES'] = fileNameList
end end
settings['PRODUCT_NAME'] = cfg.buildtarget.basename settings['PRODUCT_NAME'] = cfg.buildtarget.basename
if os.istarget(p.IOS) then
settings['SDKROOT'] = 'iphoneos'
settings['CODE_SIGN_IDENTITY[sdk=iphoneos*]'] = cfg.xcodecodesigningidentity or 'iPhone Developer'
local minOSVersion = project.systemversion(cfg)
if minOSVersion ~= nil then
settings['IPHONEOS_DEPLOYMENT_TARGET'] = minOSVersion
end
local families = {
['iPhone/iPod touch'] = '1',
['iPad'] = '2',
['Universal'] = '1,2',
}
local family = families[cfg.iosfamily]
if family then
settings['TARGETED_DEVICE_FAMILY'] = family
end
end
--ms not by default ...add it manually if you need it --ms not by default ...add it manually if you need it
--settings['COMBINE_HIDPI_IMAGES'] = 'YES' --settings['COMBINE_HIDPI_IMAGES'] = 'YES'

View File

@ -1106,6 +1106,7 @@
"aix", "aix",
"bsd", "bsd",
"haiku", "haiku",
"ios",
"linux", "linux",
"macosx", "macosx",
"solaris", "solaris",

View File

@ -34,6 +34,7 @@
premake.CSHARP = "C#" premake.CSHARP = "C#"
premake.GCC = "gcc" premake.GCC = "gcc"
premake.HAIKU = "haiku" premake.HAIKU = "haiku"
premake.IOS = "ios"
premake.LINUX = "linux" premake.LINUX = "linux"
premake.MACOSX = "macosx" premake.MACOSX = "macosx"
premake.MAKEFILE = "Makefile" premake.MAKEFILE = "Makefile"