xonotic/CMakeLists.txt

33 lines
860 B
CMake
Raw Normal View History

2017-08-02 12:38:07 +00:00
cmake_minimum_required(VERSION 2.8.12 FATAL_ERROR)
2016-03-19 04:19:17 +00:00
project(xonotic)
2016-04-14 04:16:06 +00:00
option(DOWNLOAD_MAPS "Download new maps from the build server" ON)
option(BUILD_RELEASE "Package a release" OFF)
2016-03-21 12:08:11 +00:00
function(subproject id name)
if ($ENV{XON_NO_${id}})
return()
endif ()
if (EXISTS "${PROJECT_SOURCE_DIR}/${name}/CMakeLists.txt")
2016-04-14 04:16:06 +00:00
add_subdirectory(${name} ${ARGN})
endif ()
endfunction()
2016-03-21 12:08:11 +00:00
subproject(PKI d0_blind_id)
2018-04-21 05:12:41 +00:00
subproject(DAEMON daemon)
subproject(DP darkplaces)
subproject(QCC gmqcc)
2017-07-16 04:54:54 +00:00
subproject(RADIANT netradiant)
2018-04-21 05:12:41 +00:00
subproject(DATA data/xonotic-data.pk3dir)
2016-04-14 04:16:06 +00:00
if (DOWNLOAD_MAPS)
add_custom_target(update-maps ALL
COMMAND ${PROJECT_SOURCE_DIR}/misc/tools/xonotic-map-compiler-autobuild download
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
)
endif ()
if (BUILD_RELEASE)
include(release.cmake)
endif ()