Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CMAKE building for cygwin

Tags:

cygwin

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.)

like image 617
JnBrymn Avatar asked Aug 27 '10 16:08

JnBrymn


1 Answers

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.

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
like image 78
Josh Kelley Avatar answered Sep 25 '22 19:09

Josh Kelley