734d5934f7e5af3a8fe333107881577aa78d95b3
[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(darkplaces)
14 subproject(data/xonotic-data.pk3dir)
15 subproject(gmqcc)
16 subproject(netradiant)
17
18 if (DOWNLOAD_MAPS)
19     add_custom_target(update-maps ALL
20             COMMAND ${PROJECT_SOURCE_DIR}/misc/tools/xonotic-map-compiler-autobuild download
21             WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
22             )
23 endif ()
24
25 if (BUILD_RELEASE)
26     include(release.cmake)
27 endif ()