How can i use CMake to generate Windows 10 universal project(如何使用 CMake 生成 Windows 10 通用项目)
问题描述
我正在尝试使用 CMake 为 Windows 10 生成 Visual Studio 15 项目 c++ 静态库.它应该可以在手机上使用,所以我认为它应该支持 Windows 商店.我可以设置任何标志吗?
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?
我找到了 https://github.com/Microsoft/CMake,它是微软的 CMake 分支,但我找不到如何使用它来启用通用应用支持的线索.
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.
使用正常"cmake,当我打开对 windows stope 的支持时,出现错误:
With "normal" cmake when i switch on support for windows stope I get an Error:
错误 MSB3843:项目project1"面向平台Windows",但引用了面向平台UAP"的 SDKVisual C++ 2015 Runtime for Universal Windows Platform Apps v14.0".
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".
推荐答案
CMake -G "Visual Studio 14 2015" -DCMAKE_SYSTEM_NAME=WindowsStore -DCMAKE_SYSTEM_VERSION=10.0
CMake -G "Visual Studio 14 2015" -DCMAKE_SYSTEM_NAME=WindowsStore -DCMAKE_SYSTEM_VERSION=10.0
这篇关于如何使用 CMake 生成 Windows 10 通用项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:如何使用 CMake 生成 Windows 10 通用项目
基础教程推荐
- 如何在 C++ 中正确使用命名空间? 2022-01-01
- 与 CAS 的原子交换(使用 gcc 同步内置函数) 2022-01-01
- C++:获取传递给函数的多维数组的行大小 2021-01-01
- 为什么我们不能使用“虚拟继承"?在 COM 中? 2022-01-01
- 如何更改 SysDateTimePick32 或 CDateTimeCtrl 的背景颜色? 2022-01-01
- 提升 ASIO 流缓冲 2021-01-01
- 如何部分禁用 cmake C/C++ 自定义编译器检查 2021-01-01
- 随机插入/删除的综合向量与链表基准 2022-01-01
- c++ STL设置差异 2022-01-01
- 将不可复制的闭包对象传递给 std::function 参数 2021-01-01
