X-Git-Url: https://git.jsancho.org/?p=lugaru.git;a=blobdiff_plain;f=COMPILING.md;h=fe67087d7d5ccc15ac7ba0f5ba99faa72fb3b828;hp=745cc17ff83699fd8fc8a4fdf46139036a803ebb;hb=866ceee5776e7d8b31c736b2fdb2d417b4ca67a1;hpb=50e0eedf09400b0a8d51a9e4342b5e436b8c54a1 diff --git a/COMPILING.md b/COMPILING.md index 745cc17..fe67087 100644 --- a/COMPILING.md +++ b/COMPILING.md @@ -34,10 +34,28 @@ The resulting `lugaru` binary will expect to find the `Data/` folder next to it, so either copy `build/lugaru` in the main directory, or create a symbolic link to run the game. +### Packaging + +If you want to package Lugaru for a GNU/Linux distribution, or if you want to +install it system-wide locally, you need to set the `SYSTEM_INSTALL` CMake +option, and (optionally) define the CMAKE_INSTALL_BINDIR and _DATADIR if they +differ from the default ones (`bin` and `share` appended to the prefix). +Example: + +``` +mkdir build && cd build +cmake -DSYSTEM_INSTALL=ON \ + -DCMAKE_INSTALL_BINDIR=games \ + -DCMAKE_INSTALL_DATADIR=share/games \ + .. +make +sudo make install +``` + ## Mac OSX -The instructions should be similar to the GNU/Linux ones, but have not been -tested in a Mac environment recently. +The instructions are similar to the GNU/Linux ones, provided you have +installed Xcode and the required dependencies (e.g. via homebrew). ## Windows @@ -72,7 +90,7 @@ export PATH=/usr/i686-w64-mingw32/bin:$PATH Then build: ``` mkdir build-mingw32 && cd build-mingw32 -cmake .. -DCMAKE_TOOLCHAIN_FILE=/usr/share/mingw/toolchain-mingw32.cmake -DLUGARU_INSTALL_PREFIX=install +cmake .. -DCMAKE_TOOLCHAIN_FILE=/usr/share/mingw/toolchain-mingw32.cmake -DCMAKE_INSTALL_PREFIX=install make make install ``` @@ -90,7 +108,7 @@ export PATH=/usr/x86_64-w64-mingw32/bin:$PATH ``` ``` mkdir build-mingw64 && cd build-mingw64 -cmake .. -DCMAKE_TOOLCHAIN_FILE=/usr/share/mingw/toolchain-mingw64.cmake -DLUGARU_INSTALL_PREFIX=install +cmake .. -DCMAKE_TOOLCHAIN_FILE=/usr/share/mingw/toolchain-mingw64.cmake -DCMAKE_INSTALL_PREFIX=install make make install ```