]> git.xonotic.org Git - xonotic/xonotic.git/blob - CMakeLists.txt
Update the netradiant nix env
[xonotic/xonotic.git] / CMakeLists.txt
1 cmake_minimum_required(VERSION 2.8.11 FATAL_ERROR)
2 project(xonotic)
3
4 option(DOWNLOAD_MAPS "Download new maps from the build server" ON)
5 option(BUILD_RELEASE "Package a release" OFF)
6
7 macro(subproject id name)
8     if (EXISTS "${PROJECT_SOURCE_DIR}/${name}/CMakeLists.txt" AND NOT DEFINED ENV{XON_NO_${id}})
9         add_subdirectory(${name} ${ARGN})
10     endif ()
11 endmacro()
12
13 subproject(DAEMON  daemon)
14 subproject(PKI     d0_blind_id)
15 subproject(DP      darkplaces)
16 subproject(DATA    data/xonotic-data.pk3dir)
17 subproject(QCC     gmqcc)
18 subproject(RADIANT netradiant)
19
20 if (DOWNLOAD_MAPS)
21     add_custom_target(update-maps ALL
22             COMMAND ${PROJECT_SOURCE_DIR}/misc/tools/xonotic-map-compiler-autobuild download
23             WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
24             )
25 endif ()
26
27 if (BUILD_RELEASE)
28     include(release.cmake)
29 endif ()