INSTALL
author koda
Mon, 17 Jun 2013 17:40:01 +0200
changeset 9234 2bf3796c5855
parent 8552 6c63c2833866
child 9991 3858d99476f5
child 11360 7a7611adf715
permissions -rw-r--r--
This commit changes many aspect of our cmake build system - shared libraries are compiled by default: * this modifies RPATH of unix executables; * this will prevent a lot of linking issues, esp. from pascal world; * the old behaviour (static libs) is still available with -DBUILD_SHARED_LIBS=off; * of course in this case you have to provide the full list of dependencies with FPFLAGS and CMAKE_C_FLAGS; - pascal is now fully integrated with cmake, meaning you can just do add_sources and use CMAKE_Pascal_FLAGS: * some of the language features are only partially implemented, for example .inc files will not get rebuilt if you modify them; * target_link_libraries for pascal targets is just dummy as linking is determined within pascal files; * universal builds for osx are not available any more; - bundled libraries and system libraries are addressed using the target name: * this avoids depedency tracking; * this allows to name output as we wish.

To compile and install you need:
 - CMake >= 2.6.0
 - FreePascal >= 2.2.0
 - Qt >= 4.5.0
 - SDL >= 1.2.5
 - SDL_net >= 1.2.5
 - SDL_mixer >= 1.2
 - SDL_image >= 1.2
 - SDL_ttf >= 2.0
 - Lua >= 5.1.0
 - Physfs >= 2.1.0
For server:
 - Glasgow Haskell Compiler >= 6.10
 - bytestring-show package
 - dataenc package
 - hslogger package
For videorecording:
 - FFmpeg or LibAV
 - GLUT (when SDL < 2)
For compressed screenshots:
 - libpng

Lua will be automatically built if not found.

PhysFS will internally built unless -DPHYSFS_SYSTEM=on is passed to cmake
(also allows to set PHYSFS_LIBRARY and PHYSFS_INCLUDE_DIR if needed).

1. Configure:
$ cmake .
or
$ cmake -DCMAKE_BUILD_TYPE="Release" -DCMAKE_INSTALL_PREFIX="install_prefix" \
-DDATA_INSTALL_DIR="data_dir" -DNOSERVER=1 .

Add -DNOSERVER=0 to compile net server (remember to check out the additional
dependencies with the hedgewars-server.cabal configuration file. If you have
Qt installed but it is not found, you can set it up with
-DQT_QMAKE_EXECUTABLE="path_to_qmake".
To get a glimpse of the main configuration options, you may use this command
`cat CMakeLists.txt | grep option`

2. Compile:
$ make

3. Install:
# make install


That's all! Enjoy!