fix default
[xonotic/xonotic.git] / CMakeLists.txt
1 cmake_minimum_required(VERSION 2.8.12 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 function(subproject id name)
8     if ($ENV{XON_NO_${id}})
9         return()
10     endif ()
11     if (EXISTS "${PROJECT_SOURCE_DIR}/${name}/CMakeLists.txt")
12         add_subdirectory(${name} ${ARGN})
13     endif ()
14 endfunction()
15
16 subproject(DAEMON daemon)
17 subproject(PKI d0_blind_id)
18 subproject(DP darkplaces)
19 subproject(DATA data/xonotic-data.pk3dir)
20 subproject(QCC gmqcc)
21 subproject(RADIANT netradiant)
22
23 if (DOWNLOAD_MAPS)
24     add_custom_target(update-maps ALL
25             COMMAND ${PROJECT_SOURCE_DIR}/misc/tools/xonotic-map-compiler-autobuild download
26             WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
27             )
28 endif ()
29
30 if (BUILD_RELEASE)
31     include(release.cmake)
32 endif ()