How can I use CMake to create a universal Windows 10 project

I am trying to use CMake to create a static Visual Studio 15 project library for Windows 10. It should be used on phones, so I think it should support Windows storage. Are there any flags that I can set?

I found https://github.com/Microsoft/CMake , this is Microsoft fork from CMake, but I can’t find any tips on how to use it to enable support for a single-user application.

With a "normal" cmake, when I turn on window stack support, I get an error:

error MSB3843: Project "project1" targets the Windows platform, but refers to the Visual C ++ 2015 Runtime for Windows Platform v14.0 Generic Applications SDK, which targets the UAP platform.

+7
c ++ windows-10 visual-studio-2015 windows-10-mobile
source share
2 answers

CMake -G "Visual Studio 14 2015" -DCMAKE_SYSTEM_NAME = WindowsStore -DCMAKE_SYSTEM_VERSION = 10.0

+10
source share

Universal Windows project support is provided from cmake version 3.4.0 onwards. Older versions do not support it. The above command works with cmake 3.4.0.

+2
source share

All Articles