diff options
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/genie.lua | 4 | ||||
-rw-r--r-- | scripts/src/3rdparty.lua | 10 | ||||
-rw-r--r-- | scripts/toolchain.lua | 59 |
3 files changed, 65 insertions, 8 deletions
diff --git a/scripts/genie.lua b/scripts/genie.lua index c0424b34f99..39669acb524 100644 --- a/scripts/genie.lua +++ b/scripts/genie.lua @@ -482,7 +482,7 @@ configuration { "Release", "vs*" } "Optimize", } --- Force VS2015 targets to use bundled SDL2 +-- Force VS2015/17 targets to use bundled SDL2 if string.sub(_ACTION,1,4) == "vs20" and _OPTIONS["osd"]=="sdl" then if _OPTIONS["with-bundled-sdl2"]==nil then _OPTIONS["with-bundled-sdl2"] = "1" @@ -1275,7 +1275,7 @@ end includedirs { MAME_DIR .. "3rdparty/dxsdk/Include" } -configuration { "vs2015*" } +configuration { "vs201*" } buildoptions { "/wd4334", -- warning C4334: '<<': result of 32-bit shift implicitly converted to 64 bits (was 64-bit shift intended?) "/wd4456", -- warning C4456: declaration of 'xxx' hides previous local declaration diff --git a/scripts/src/3rdparty.lua b/scripts/src/3rdparty.lua index f9068c05494..e398353362c 100644 --- a/scripts/src/3rdparty.lua +++ b/scripts/src/3rdparty.lua @@ -60,7 +60,7 @@ if _OPTIONS["vs"]=="intel-15" then "/Qwd869", -- remark #869: parameter "xxx" was never referenced } end - configuration { "vs2015*" } + configuration { "vs201*" } buildoptions { "/wd4456", -- warning C4456: declaration of 'xxx' hides previous local declaration } @@ -289,7 +289,7 @@ end "-include stdint.h" } - configuration { "vs2015*" } + configuration { "vs201*" } buildoptions { "/wd4456", -- warning C4456: declaration of 'xxx' hides previous local declaration } @@ -377,7 +377,7 @@ if _OPTIONS["vs"]=="intel-15" then "/Qwd869", -- remark #869: parameter "xxx" was never referenced } end - configuration { "vs2015*" } + configuration { "vs201*" } buildoptions { "/wd4456", -- warning C4456: declaration of 'xxx' hides previous local declaration "/wd4457", -- warning C4457: declaration of 'xxx' hides function parameter @@ -672,7 +672,7 @@ if _OPTIONS["vs"]=="intel-15" then } end - configuration { "vs2015*" } + configuration { "vs201*" } buildoptions { "/wd4456", -- warning C4456: declaration of 'xxx' hides previous local declaration } @@ -924,7 +924,7 @@ end -- "/Qwd1879", -- warning #1879: unimplemented pragma ignored -- } --end --- configuration { "vs2015*" } +-- configuration { "vs201*" } -- buildoptions { -- "/wd4456", -- warning C4456: declaration of 'xxx' hides previous local declaration -- } diff --git a/scripts/toolchain.lua b/scripts/toolchain.lua index 99a3647b6ec..46a1b4b22ce 100644 --- a/scripts/toolchain.lua +++ b/scripts/toolchain.lua @@ -51,6 +51,8 @@ newoption { { "intel-15", "Intel C++ Compiler XE 15.0" }, { "vs2015-clang", "Clang 3.6" }, { "vs2015-xp", "Visual Studio 2015 targeting XP" }, + { "vs2017-clang", "Clang 3.6" }, + { "vs2017-xp", "Visual Studio 2017 targeting XP" }, { "winphone8", "Windows Phone 8.0" }, { "winphone81", "Windows Phone 8.1" }, { "winstore81", "Windows Store 8.1" }, @@ -330,7 +332,6 @@ function toolchain(_buildDir, _subDir) if "ci20" == _OPTIONS["gcc"] then location (_buildDir .. "projects/" .. _subDir .. "/".. _ACTION .. "-ci20") end - elseif _ACTION == "vs2015" or _ACTION == "vs2015-fastbuild" then if (_ACTION .. "-clang") == _OPTIONS["vs"] then @@ -386,8 +387,64 @@ function toolchain(_buildDir, _subDir) premake.vstudio.toolset = ("v140_xp") location (_buildDir .. "projects/" .. _subDir .. "/".. _ACTION .. "-xp") end + elseif _ACTION == "vs2017" or _ACTION == "vs2017-fastbuild" then + + if (_ACTION .. "-clang") == _OPTIONS["vs"] then + premake.vstudio.toolset = ("LLVM-" .. _ACTION) + location (_buildDir .. "projects/" .. _subDir .. "/".. _ACTION .. "-clang") + end + + if "winphone8" == _OPTIONS["vs"] then + premake.vstudio.toolset = "v110_wp80" + location (_buildDir .. "projects/" .. _subDir .. "/".. _ACTION .. "-winphone8") + end + + if "winphone81" == _OPTIONS["vs"] then + premake.vstudio.toolset = "v120_wp81" + platforms { "ARM" } + location (_buildDir .. "projects/" .. _subDir .. "/".. _ACTION .. "-winphone81") + end + + if "winstore81" == _OPTIONS["vs"] then + premake.vstudio.toolset = "v120" + premake.vstudio.storeapp = "8.1" + platforms { "ARM" } + location (_buildDir .. "projects/" .. _subDir .. "/".. _ACTION .. "-winstore81") + end + + if "winstore82" == _OPTIONS["vs"] then + premake.vstudio.toolset = "v141" + premake.vstudio.storeapp = "8.2" + + -- If needed, depending on GENie version, enable file-level configuration + if enablefilelevelconfig ~= nil then + enablefilelevelconfig() + end + + local action = premake.action.current() + action.vstudio.windowsTargetPlatformVersion = windowsPlatform + + platforms { "ARM" } + location (_buildDir .. "projects/" .. _subDir .. "/".. _ACTION .. "-winstore82") + end + + if "intel-14" == _OPTIONS["vs"] then + premake.vstudio.toolset = "Intel C++ Compiler XE 14.0" + location (_buildDir .. "projects/" .. _subDir .. "/".. _ACTION .. "-intel") + end + + if "intel-15" == _OPTIONS["vs"] then + premake.vstudio.toolset = "Intel C++ Compiler XE 15.0" + location (_buildDir .. "projects/" .. _subDir .. "/".. _ACTION .. "-intel") + end + + if ("vs2017-xp") == _OPTIONS["vs"] then + premake.vstudio.toolset = ("v141_xp") + location (_buildDir .. "projects/" .. _subDir .. "/".. _ACTION .. "-xp") + end elseif _ACTION == "xcode4" then + if "osx" == _OPTIONS["xcode"] then premake.xcode.toolset = "macosx" location (path.join(_buildDir, "projects", _ACTION .. "-osx")) |