[cmake-developers] [Patch] Adding Windows 10 support

Gilles Khouzam Gilles.Khouzam at microsoft.com
Sun Aug 30 18:41:54 EDT 2015


This patch adds support for Windows 10 Universal application in CMake. Starting with Windows 10, Universal applications are the new equivalent to Windows Store and Windows Phone apps.

The patch adds similar support that we had for Windows 8.0 and Windows 8.1 for Store apps. This does not add WindowsPhone 10 support as it is included in WindowsStore 10 support.

To target a Windows Universal App, CMAKE_SYSTEM_VERSION should be set to WindowsStore and CMAKE_SYSTEM_VERSION should be set to 10.0
_____________________________________________
As part of this, some new properties have been added:

Ability to set Desktop, Mobile and IOT (Internet of Things) extensions using the following properties
/prop_tgt/VS_DESKTOP_EXTENSIONS_VERSION
/prop_tgt/VS_IOT_EXTENSIONS_VERSION
/prop_tgt/VS_MOBILE_EXTENSIONS_VERSION

For each of these properties, if it is set, a reference to the extension SDK will be added allowing the application to target functionality specific to Desktop, Mobile or IOT respectively. For the time being the version of the SDK is 10.0.10240.0 for each of those but will change as new versions of the Windows 10 SDK come one.

Set the project to be a IOT continuous running task.
/prop_tgt/VS_IOT_STARTUP_TASK


Specify the target platform version and minimum version
/prop_tgt/VS_TARGET_PLATFORM_MIN_VERSION
/prop_tgt/VS_TARGET_PLATFORM_VERSION

By specifying either of these properties, the respective visual studio property WindowsTargetPlatformVersion and WindowsTargetPlatformMinVersion will be set to the value set. If the value is not set, the latest SDK version will be used and queried in the same way that VCVars.bat from VS 2015 figures out which SDKs are installed; since this property is required for Universal apps, the detection code will add a definition VS_DEFAULT_TARGET_PLATFORM_VERSION on the makefile for proper compiler detection.


Adding a new file property:  VS_TOOL_OVERRIDE to override the default tool that a file will be processed with. By default the extension is used to specify a tool, this property will allow to change the default or set a new tool that CMake might not know about. For example this allows to process .RESW multi language files without having to specifically add support to CMake.

____________________________________________________
This change should address the following issues:



http://www.cmake.org/Bug/view.php?id=15670
[CMake 0015670]: Add support for setting "Windows target platform version" in VS2015


https://public.kitware.com/Bug/view.php?id=15686
[CMake 0015686]: Windows phone projects targeting Windows 10 differ from Windows Phone 8.1 projects


https://public.kitware.com/Bug/view.php?id=15662
[CMake 0015662]: Add support for Windows/Windows Phone SDKs with Visual Studio 2015

As part of this change, I'm also fixing a bug when using VS2015 to target Windows Phone or Windows Store 8.1 without having VS2013 installed, where we would look for the desktop toolset being installed based on the CMAKE_SYSTEM_VERSION instead of by using the Generator requested. The change is simply to make the desktop detection code be virtual. As long as there is a desktop toolset for the current generator, things would work properly.

We've also added Windows 10 support to our dashboard to keep these feature tested.

Thanks

~Gilles

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20150830/59b065c0/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Windows10Universal.patch
Type: application/octet-stream
Size: 40880 bytes
Desc: Windows10Universal.patch
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20150830/59b065c0/attachment-0001.obj>


More information about the cmake-developers mailing list