Latest Posts

Changes in WidelandsGoingCMake

Revision Differences of Revision 5

# Widelands going CMake ¶

Widelands project plans to move from the current build system S
cCons to CMake. ¶

This page is to track progress and collect important information in the transition process. ¶

## Table of Contents: ¶
[TOC] ¶



## Important Links ¶

* [S
cCons](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
into 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 ScCons 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)
#### Preparation ¶
* $ mkdir ~/wl_cmake_transition ¶
* $ cd ~/wl_cmake_transition ¶
* $ svn co https://widelands.svn.sourceforge.net/svnroot/widelands/branches/cmake-migration widelands-cmake ¶
* $ mkdir widelands-build ¶

#### Using CMake ¶
* $ cd ~/wl_cmake_transition/widelands-build ¶
* $ cmake -DCMAKE_INSTALL_PREFIX=~/wl_cmake_transition/widelands-install ../widelands-cmake ¶
* $ make install -j3

*make install includes make; -j3 means use 3 concurrent compile tasks