Changes in WidelandsGoingCMake
Editor Comment
Different attempt for the out-of-source build: only one subdir
Revision Differences of Revision 6
# Widelands going CMake ¶¶
Widelands project plans to move from the current build system SCons to CMake. ¶
¶
This page is to track progress and collect important information in the transition process. ¶
¶
## Table of Contents: ¶
[TOC] ¶
¶
¶
¶
## Important Links ¶
¶
* [SCons](http://www.scons.org) ¶
* [CMake](http://www.cmake.org) ¶
* [CMake Tutorial \(PDF\]](http://www-flc.desy.de/ldcoptimization/documents/talks/CMake_Tutorial.pdf) ¶
¶
## Identified Tasks ¶
### Changes to do Build ¶
* *make install* does not exclude SVN directories ¶
* add "PATTERN "\*.svn\*" EXCLUDE" to global CMakeLists.txt file *INSTALL* directive ¶
* *make install* includes the *doc* directory which is not necessary for release, but maybe interesting for debug ¶
### Transition tasks ¶
* CMake's "make install" installs in /usr/local - needs root. Just "make" creates the executables but does not lay out a usable installation of widelands. The "make" should create a runnable widelands installation in a subdirectory of the build directory, since we don't need root to run widelands. Then "make install" could just copy the files to /usr/local. Discuss? ¶
* CMake currently always creates a Debug build (at least it seems so). It should be possible to build a Release. ¶
* Identify SCons tasks and targets used by widelands, replace using cmake & make ¶
¶
## Important notes ¶
### Things to know about the transition ¶
* Transition uses a SVN branch called "cmake-transition", not "trunk" ¶
¶
### Starting with CMake in the transition (this is for Linux; Windows will differ) ¶
#### 1. Preparation ¶
* $
* $
* $ svn co https://widelands.svn.sourceforge.net/svnroot/widelands/branches/cmake-migration widelands-cmake ¶
* $ mkdir widelands-cmake/build-cmake ¶
¶
#### 2. Using CMake ¶
* $ cd ~/widel
* go t
* $ cmake .. ¶
* let CMa
* $ cmake -DCMAKE_INSTALL_PREFIX=~/widel
* if you wan
¶
#### 3.
* $ cd ~/widelands-cmake/build-cmake ¶
*
* $ ma
* t
* $ make
*make