1
2This file describes additional build options that are recognized by the CMakeLists.txt but will probably not need to be modifed:
3
4### Default data directories
5
6| Option                | Windows default                                        |
7|---------------------- | ------------------------------------------------------ |
8| `USER_DIR_PREFIXES`   | `%FOLDERID_SavedGames%`                                |
9| `USER_DIR`            | `Arx Libertatis`                                       |
10| `CONFIG_DIR_PREFIXES` |                                                        |
11| `CONFIG_DIR`          |                                                        |
12| `DATA_DIR_PREFIXES`   |                                                        |
13| `DATA_DIR`            |                                                        |
14
15| Option                | Mac default                                            |
16|---------------------- | ------------------------------------------------------ |
17| `USER_DIR_PREFIXES`   | `~/Library/Application Support`                        |
18| `USER_DIR`            | `ArxLibertatis`                                        |
19| `CONFIG_DIR_PREFIXES` |                                                        |
20| `CONFIG_DIR`          |                                                        |
21| `DATA_DIR_PREFIXES`   | `/Applications`                                        |
22| `DATA_DIR`            | `ArxLibertatis`                                        |
23
24| Option                |  Linux / BSD / other default                           |
25|---------------------- | ------------------------------------------------------ |
26| `USER_DIR_PREFIXES`   | `${XDG_DATA_HOME:-$HOME/.local/share}`                 |
27| `USER_DIR`            | `arx`                                                  |
28| `CONFIG_DIR_PREFIXES` | `${XDG_CONFIG_HOME:-$HOME/.config}`                    |
29| `CONFIG_DIR`          | `arx`                                                  |
30| `DATA_DIR_PREFIXES`   | `${XDG_DATA_DIRS:-/usr/local/share/:/usr/share/}:/opt` |
31| `DATA_DIR`            | `games/arx:arx`                                        |
32
33These pairs define prefixes and suffixes that are combined to form searched paths for the user, config and data directories respectively.
34
35To avoid possible performance issues, there is `IGNORE_EXE_DIR` to list directories to *not* search for data files even if they contain the game executable. By default, this is only set for Linux: `/usr/bin:/usr/games:/usr/games/bin:/usr/local/bin:/usr/local/games:/usr/local/games/bin`
36
37All the configuration options above can reference environment variables in operating-system specific shell syntax which will be expanded at run-time. For Windows `%FOLDERID_SavedGames%` is defined to the Windows saved games directory for the current user. For other systems arx will make sure that [XDG Base Directory Specification](http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html) variables are defined.
38
39After environment variable expansion the variables are interpreted as colon-separated (Windows: semicolon-separated) lists of paths.
40
41The config directory defaults to the user directory if not specified.
42
43### Compiler flags
44
45Arx Libertatis adjust the compiler flags to provide an optimal configuration for developers and most users. The following CMake options can be used to disable this and use only the default flags provided by the build environment.
46
47* `SET_WARNING_FLAGS` (default: `ON`): Adjust compiler warning flags. This should not affect the produced binaries but is useful to catch potential problems.
48* `SET_OPTIMIZATION_FLAGS` (default: `ON`): Adjust compiler optimization flags. For non-debug builds the only thing this does is instruct the linker to only link against libraries that are actually needed.
49* `USE_CXX11` (default: `ON`): Try to compile in C++11 mode if available.
50
51### Static linking
52
53* `USE_STATIC_LIBS` (default: `ON` on Windows, `OFF` elsewhere): Turns on static linking for all libraries, including `-static-libgcc` and `-static-libstdc++`. You can also use the individual options below:
54* `GLEW_USE_STATIC_LIBS` (default: `ON` iff `USE_STATIC_LIBS` is enabled): Statically link GLEW.
55* `Boost_USE_STATIC_LIBS` (default: `ON` iff `USE_STATIC_LIBS` is enabled): Statically link Boost. See also `FindBoost.cmake` in your CMake installation.
56
57### Install options
58
59The following options can be used to customize where `make install` puts the various components. All of the following paths can either be absolute or relative to the `CMAKE_INSTALL_PREFIX`.
60
61* `CMAKE_INSTALL_DATAROOTDIR` (default: `share`): Where to install data files
62* `ICONDIR` (default: `${DATAROOTDIR}/pixmaps`): Where to install icons
63* `APPDIR` (default: `${DATAROOTDIR}/applications`): Where to install .desktop files
64* `CMAKE_INSTALL_MANDIR` (default: `${DATAROOTDIR}/man`): Where to install man pages
65* `CMAKE_INSTALL_BINDIR` (default: `bin`): Where to install user executables
66* `GAMESBINDIR` (default: `${BINDIR}`): Where to install game executables
67* `CMAKE_INSTALL_LIBEXECDIR` (default: `libexec`): Where to install non-user executables
68* `SCRIPTDIR` (default: `${BINDIR}`): Where to install the data install script
69
70* `INSTALL_SCRIPTS` (default: `ON`): Install the data install script. There is no data install script on Windows, so there this option does nothing.
71
72### Optional dependencies
73
74By default, optional components will be automatically disabled if their dependencies could not be found. This might be undesirable in some situations, so the following option can be used to change this behavior:
75
76* `STRICT_USE` (default: OFF): Abort the configure step if one of the dependencies enabled with a `USE_*` configuration variable could not be found or if one of the components enabled with a `BUILD_*`configuration variable has missing dependencies. As most dependencies are enabled by default, you may need to explicitly disable some of them. Windows-specifc dependencies are still automatically disabled on non-Windows systems.
77* `USE_QT5` (default=ON): Use Qt 5 libraries for the crash reporter if available^1
78* `USE_QT4` (default=ON): Use Qt 4 libraries for the crash reporter if available^1
79
801. If both `USE_QT5` and `USE_QT4` are enabled we will try to use Qt 5 if available and then fall back to Qt 4. Both are ignored if `BUILD_CRASHREPORTER` is disabled.
81