From 931e647744c0440d66c6e4283966ca7fa4e23f0a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miodrag=20Milanovi=C4=87?= Date: Fri, 18 Nov 2016 17:57:39 +0100 Subject: [PATCH] Added option to set specific windows option to a toolchain when building UWP application (#133) --- scripts/toolchain.lua | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/scripts/toolchain.lua b/scripts/toolchain.lua index 34e1750..580666f 100644 --- a/scripts/toolchain.lua +++ b/scripts/toolchain.lua @@ -92,6 +92,12 @@ function toolchain(_buildDir, _libDir) description = "Set tvOS target version (default: 9.0).", } + newoption { + trigger = "with-windows", + value = "#", + description = "Set the Windows target platform version (default: 10.0.10240.0).", + } + newoption { trigger = "with-dynamic-runtime", description = "Dynamically link with the runtime rather than statically", @@ -133,6 +139,11 @@ function toolchain(_buildDir, _libDir) tvosPlatform = _OPTIONS["with-tvos"] end + local windowsPlatform = "10.0.10240.0" + if _OPTIONS["with-windows"] then + windowsPlatform = _OPTIONS["with-windows"] + end + local compiler32bit = false if _OPTIONS["with-32bit-compiler"] then compiler32bit = true @@ -422,6 +433,11 @@ function toolchain(_buildDir, _libDir) elseif "winstore82" == _OPTIONS["vs"] then premake.vstudio.toolset = "v140" premake.vstudio.storeapp = "8.2" + + local action = premake.action.current() + action.vstudio.windowsTargetPlatformVersion = windowsPlatform + action.vstudio.windowsTargetPlatformMinVersion = windowsPlatform + platforms { "ARM" } location (path.join(_buildDir, "projects", _ACTION .. "-winstore82"))