Update maplist in server.cfg
[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(d0_blind_id)
15 subproject(darkplaces)
16 subproject(data/xonotic-data.pk3dir)
17 subproject(gmqcc)
18 subproject(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 ()