[英]How can i use CMake to generate Windows 10 universal project
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. 我正在尝试使用CMake为Windows 10生成Visual Studio 15项目c ++静态库。它应该可以在手机上使用,所以我认为它应该支持Windows应用商店。 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. 我发现https://github.com/Microsoft/CMake ,它是微软的CMake的分支,但我找不到如何使用它来启用uniwersal app支持的线索。
With "normal" cmake when i switch on support for windows stope I get an Error: 使用“正常”cmake当我打开对windows stope的支持时,我得到一个错误:
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". 错误MSB3843:项目“project1”以平台“Windows”为目标,但引用了针对平台“UAP”的SDK“Visual C ++ 2015 Runtime for Universal Windows Platform Apps v14.0”。
CMake -G“Visual Studio 14 2015”-DCMAKE_SYSTEM_NAME = WindowsStore -DCMAKE_SYSTEM_VERSION = 10.0
The support for Universal Windows project is provided from cmake version 3.4.0 onwards. 从cmake版本3.4.0开始提供对通用Windows项目的支持。 Older versions don't support it. 旧版本不支持它。 The above command works with cmake 3.4.0. 以上命令适用于cmake 3.4.0。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.