简体   繁体   English

我如何使用CMake生成Windows 10通用项目

[英]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.

相关问题 如何使用CMake生成针对Windows XP的Visual Studio 2012项目? - How can I generate a Visual Studio 2012 project targeting Windows XP with CMake? 如何在基于CMake的项目中使用Boost.Test? - How can I use Boost.Test in a CMake based project? 如何在命令行上使用 CMake? - Windows - How can I use CMake on command line? - Windows 如何使用纯C ++而不是C ++ / CLI开发通用Windows 10应用程序? - How can I develop universal windows 10 apps with pure C++ and not C++/CLI? QT Creator 无法在 Windows 10 中使用 CMake 或 QMake - QT Creator can't use CMake or QMake in Windows 10 如何添加对 Windows 通用 C++ 项目的引用 - How do I add a reference to a Windows Universal C++ project 无法使用CMake生成OpenCV项目 - Unable to use CMake to Generate OpenCV Project 我可以在 Windows 10 上使用 Thread Sanitizer 吗? - Can I use Thread Sanitizer on Windows 10? 如何使用 Catch2 测试我的 CMake 静态库项目? - How can I use Catch2 to test my CMake static library project? 从 Linux 构建 Windows 应用程序时,如何使用 CMake 获取它的依赖项? - How can I use CMake to get dependencies for Windows app while building it from Linux?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM