cygwin的CMAKE建筑 [英] CMAKE building for cygwin
问题描述
我使用CMAKE为我需要构建的库创建Visual Studios C ++项目,然后我使用VC ++构建库。但是,现在已经为cygwin重建了相同的库,所以我可以链接到它与GNU工具链(g ++ make gdb)。我一直在试图找出如何配置CMAKE为cygwin构建,但我不会变得很远。我已经检查了CMAKE网站的帮助(我会继续搜索那里),但我几乎没有抓住什么CMAKE真的是,所以我无法找到答案。谁能指点我更好的方向? (感谢,全部。)
I used CMAKE to create the Visual Studios C++ project for a library that I needed to build, and then I used VC++ to build the library. However, the time has come to rebuild the same library for cygwin so that I can link to it with the GNU tool chain (g++ make gdb). I've been trying to figure out how to configure CMAKE to build for cygwin but I'm not getting very far. I've checked the CMAKE website for help (and I will continue to search around there), but I barely have a grasp on what CMAKE really is, so I am having trouble finding the answers. Can anyone point me in a better direction? (Thanks, All.)
推荐答案
CMake是一个构建系统。它的目的是让你编写一个跨平台的构建描述,然后它从该构建设置创建平台特定的构建文件(例如GNU工具链的makefile)。
CMake is a build system. It's designed to let you write a single cross-platform build description, then it creates platform-specific build files (such as makefiles for the GNU toolchain) from that build setup.
要使它在Cygwin下工作,应该足以安装 cmake
Cygwin软件包(使用Cygwin的 setup.exe
)然后运行类似下面的命令:(因为你将为Cygwin运行CMake,你不需要做任何配置它的GNU工具链)。
To make it work under Cygwin, it should suffice to install the cmake
Cygwin package (using Cygwin's setup.exe
) then run commands similar to the following: (Since you'll be running CMake for Cygwin, you won't need to do anything to configure it for the GNU toolchain).
mkdir my-project-build
cd my-project-build
cmake /path/to/my-project
make
这篇关于cygwin的CMAKE建筑的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!