]> git.xonotic.org Git - xonotic/xonotic.git/blob - CMakeLists.txt
55ee124f2d4357938270551be374b0f99032956a
[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 name)
8     if (EXISTS "${PROJECT_SOURCE_DIR}/${name}/CMakeLists.txt")
9         add_subdirectory(${name} ${ARGN})
10     endif ()
11 endmacro()
12
13 subproject(daemon)
14 subproject(darkplaces)
15 subproject(data/xonotic-data.pk3dir)
16 subproject(gmqcc)
17 subproject(netradiant)
18
19 if (DOWNLOAD_MAPS)
20     add_custom_target(update-maps ALL
21             COMMAND ${PROJECT_SOURCE_DIR}/misc/tools/xonotic-map-compiler-autobuild download
22             WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
23             )
24 endif ()
25
26 if (BUILD_RELEASE)
27     include(release.cmake)
28 endif ()