CMake为Win32和x64生成Visual Studio 2008解决方案 [英] CMake generate Visual Studio 2008 solution for Win32 and x64

查看:653
本文介绍了CMake为Win32和x64生成Visual Studio 2008解决方案的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在Windows XP下使用CMake 2.8,并希望生成一个Visual Studio 2008解决方案文件,其中包含Win32和x64的Release和Debug配置。

I am using CMake 2.8 under Windows XP and want to generate a Visual Studio 2008 solution file which contains Release and Debug configurations for both Win32 and x64.

这可以吗?通过在 CMakeLists.txt 文件中设置CMake配置变量来完成?

Can this be done by setting a CMake configuration variable in the CMakeLists.txt file?

推荐答案

您不能在CMakeLists中指定项目的生成器(makefile,XCode,Visual Studio)。当用户在您的源上运行CMake时,将指定生成器。

The CMakeLists is not where you specify the generator ( makefile, XCode, Visual Studio ) for a project. The generator is specified when a user runs CMake on your source.

这篇关于CMake为Win32和x64生成Visual Studio 2008解决方案的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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