[英]Visual Studio cmake target platform and platform toolset
I created a cmake project through MSVS2019 and need to set Target Platform Version to 8.1 (instead of the default 10.0) and Platform Toolset to v140 (as opposed to 142).我通过 MSVS2019 创建了一个 cmake 项目,需要将 Target Platform Version 设置为 8.1(而不是默认的 10.0),将 Platform Toolset 设置为 v140(而不是 142)。
Here are the two settings if I were working with a msvs project (instead of cmake in msvs2019):如果我正在使用 msvs 项目(而不是 msvs2019 中的 cmake),这是两个设置:
The documentation for cmake on msvs2019 is pretty sparse and wish there was some kind of mapping between visual studio project settings and cmake. msvs2019 上关于 cmake 的文档非常少,希望在 visual studio 项目设置和 cmake 之间有某种映射。
This was working for me:这对我有用:
set_target_properties( MyProjectName
PROPERTIES
VS_PLATFORM_TOOLSET v140 )
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.