How can i use CMake to generate Windows 10 universal project

久未见 提交于 2019-11-30 13:21:22

问题


I'm trying to use CMake to generate Visual Studio 15 project c++ static library for Windows 10. It should be usable on phones so I think it should have support for windows store. Are there any flags I can set?

I've found https://github.com/Microsoft/CMake, it is Microsoft's fork of CMake, but I can't find a clue how to use it to enable uniwersal app support.

With "normal" cmake when i switch on support for windows stope I get an Error:

error MSB3843: Project "project1" targets platform "Windows", but references SDK "Visual C++ 2015 Runtime for Universal Windows Platform Apps v14.0" which targets platform "UAP".


回答1:


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




回答2:


The support for Universal Windows project is provided from cmake version 3.4.0 onwards. Older versions don't support it. The above command works with cmake 3.4.0.



来源:https://stackoverflow.com/questions/31857315/how-can-i-use-cmake-to-generate-windows-10-universal-project

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!