summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
blob: fee45df361de3ea77165ce13abbf621f915ed626 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
cmake_minimum_required(VERSION 3.20)
project(kurator)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_EXTENSIONS No)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wpedantic -D_USE_MATH_DEFINES")
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules")
set(STEAM_APPID $ENV{STEAM_APPID} CACHE STRING "App ID for steam deployment")
set(STEAM_DEPOTID_WINDOWS $ENV{STEAM_DEPOTID_WINDOWS} CACHE STRING "Steam Depot ID for Windows builds")
set(STEAM_DEPOTID_LINUX $ENV{STEAM_DEPOTID_LINUX} CACHE STRING "Steam Depot ID for Linux builds")
set(CMAKE_INSTALL_BINDIR .)
enable_testing()
include(AddResources)
include(AddVersionFile)
include(FetchContent)
include(GoogleTest)
add_subdirectory(contrib)  # Out of order to handle dependencies.
add_subdirectory(campaign)
add_subdirectory(engine)
add_subdirectory(kurator)
add_subdirectory(sim)
add_subdirectory(stats)
add_subdirectory(universe)
add_version_file(version.txt version.txt.conf)
add_version_file(default.vdf default.vdf.conf)
add_custom_target(version ALL DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/version.txt")
add_custom_target(vdfs ALL DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/default.vdf")