How can I generate a Visual Studio 2012 project focused on Windows XP using CMake?

When Visual Studio 2012 Update 1 is released, I hope to build a C ++ project to support Windows XP. Is there a way to use CMake to create a project that is designed for Windows XP? Basically, CMake would have to generate a project file that uses Platform Toolset = Visual Studio 2012 - Windows XP (v110_xp).

+18
c ++ visual-studio windows-xp visual-studio-2012 cmake
Nov 28 '12 at 2:31
source share
4 answers

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

Update: The error mentioned above was fixed by the following comment:

Fixed in CMake version 2.8.11

Here's a new feature called “generator toolbox”:

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

Now you can run CMake from the command line using

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

to create using a specific set of tools. We have not yet added a first-class interface for cmake-gui for this, but you can add a cache entry "CMAKE_GENERATOR_TOOLSET" to save the value "-T" before configuration.

You can also see comments on other answers.

+13
Nov 28 '12 at 8:35
source share

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

Fixed in CMake version 2.8.11

Here's a new feature called “generator toolbox”:

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

Now you can run CMake from the command line using

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

to create using a specific set of tools. We have not yet added a first-class interface for cmake-gui for this, but you can add a cache entry "CMAKE_GENERATOR_TOOLSET" to save the value "-T" before configuration.

+17
Apr 08 '13 at 10:21
source share

I think you can just create a solution for Visual Studio 2010/2012. Open this solution, open the solution / project in Visual Studio, open the properties and reconfigure the platform toolkit to v110_xp.

Then everything will be fine. But I'm still looking for a solution on how to configure the command line to create v110_xp programs ...

+1
Nov 28
source share

I think the best way to solve this problem is to use CMake to create your project for Visual Studio 2010, and then open the project using Visual Studio 2012. When you do this, the used toolbox will be vs2010, which works for WinXP.

+1
Apr 23 '13 at 3:50
source share



All Articles