如何生成一个Visual Studio 2012项目针对Windows XP与CMake? [英] How can I generate a Visual Studio 2012 project targeting Windows XP with CMake?

查看:571
本文介绍了如何生成一个Visual Studio 2012项目针对Windows XP与CMake?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Visual Studio 2012 Update 1发布后,我希望构建一个C ++项目来支持Windows XP。有没有办法使用CMake生成目标为Windows XP的项目?基本上,CMake需要生成使用Platform Toolset = Visual Studio 2012 - Windows XP(v110_xp)的项目文件。

解决方案

http://www.cmake.org/Bug/view.php?id=10722



更新:上述错误已通过以下注释解决:


在版本CMake 2.8.11中修复



此处添加了一个新的生成器工具集功能: p>

http://cmake.org /gitweb?p=cmake.git;a=commitdiff;h=7dab9977 [^]



现在可以从命令行运行CMake, p>

-GVisual Studio 10-Tv90



,以便使用特定工具集构建。我们还没有为cmake-gui添加一个
一级接口,但是可以在
配置之前添加缓存
条目CMAKE_GENERATOR_TOOLSET来包含-T值。


您也可以查看对其他答案的评论。


With Visual Studio 2012 Update 1 released, I am hoping to build a C++ project to support Windows XP. Is there a way to use CMake to generate a project that targets Windows XP? Basically CMake would need to generate a project file that uses Platform Toolset = Visual Studio 2012 - Windows XP (v110_xp).

解决方案

According to http://www.cmake.org/Bug/view.php?id=10722 the answer is no yes.

Update: The bug mentioned above has been resolved with the following comment:

Fixed in Version CMake 2.8.11

A new "generator toolset" feature has been added here:

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7dab9977 [^]

One may now run CMake from the command line with

-G "Visual Studio 10" -T "v90"

in order to build with a specific toolset. We've not yet added a first-class interface to cmake-gui for this, but one may add the cache entry "CMAKE_GENERATOR_TOOLSET" to contain the "-T" value before configuring.

You might also look at the comments made to the other answers.

这篇关于如何生成一个Visual Studio 2012项目针对Windows XP与CMake?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆