[CMake] Performing cross-platform build - how ?

Matthew McCormick matthew.m.mccormick at gmail.com
Tue Nov 13 18:11:07 EST 2007


On 11/13/07, Stephen Collyer <scollyer at netspinner.co.uk> wrote:

1. Let's assume I want to do a Linux and Win32 build from the
same source tree.

2. I have a directory tree like:

./src/<whatever>
./build/linux
./build/win32
./install/linux/<whatever>
./install/win32/<whatever>

All of my cross-platform source resides uder src. This whole
tree, both src and build is mounted so as to be visible to
my Linux box and Windows machine.

3. I set up CMakeList.txt files appropriately in . and the
various subdirs of src

4. On my Linux box, I cd into build/linux and I type:

cmake ../..


You don't want/need a CMakeLists.txt in '.'  You only need one in ./src/ and
sub directories. then

cd build/linux
ccmake ../../src
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/cmake/attachments/20071113/fdea5535/attachment.htm


More information about the CMake mailing list