-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
67 lines (48 loc) · 1.64 KB
/
CMakeLists.txt
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
cmake_minimum_required(VERSION 3.8.2 FATAL_ERROR)
project(rtcw VERSION 1.0.0)
set (CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake)
message (STATUS "[${PROJECT_NAME}] Version: ${PROJECT_VERSION}")
option (RTCW_SP "Build single-player." ON)
message (STATUS "[${PROJECT_NAME}] Single-player: ${RTCW_SP}")
option (RTCW_MP "Build multi-player." ON)
message (STATUS "[${PROJECT_NAME}] Multiplayer: ${RTCW_MP}")
option (RTCW_MP_DED "Build multi-player (dedicated)." ON)
message (STATUS "[${PROJECT_NAME}] Multiplayer (dedicated): ${RTCW_MP_DED}")
option (RTCW_ET "Build Enemy Territory." ON)
message (STATUS "[${PROJECT_NAME}] Enemy Territory: ${RTCW_ET}")
option (RTCW_ET_DED "Build Enemy Territory (dedicated)." ON)
message (STATUS "[${PROJECT_NAME}] Enemy Territory (dedicated): ${RTCW_ET_DED}")
if (NOT (RTCW_ET OR
RTCW_ET_DED OR
RTCW_MP OR
RTCW_MP_DED OR
RTCW_SP))
message (FATAL_ERROR "[${PROJECT_NAME}] Nothing to build!")
endif ()
include (rtcw)
add_subdirectory (src/lib/dear_imgui)
add_subdirectory (src/lib/miniz)
if (RTCW_SP)
add_subdirectory (src/cgame/sp)
add_subdirectory (src/game/sp)
add_subdirectory (src/ui/sp)
add_subdirectory (src/rtcw_sp)
endif ()
if (RTCW_MP)
add_subdirectory (src/cgame/mp)
add_subdirectory (src/game/mp)
add_subdirectory (src/ui/mp)
add_subdirectory (src/rtcw_mp)
endif ()
if (RTCW_MP_DED)
add_subdirectory (src/rtcw_mp_ded)
endif ()
if (RTCW_ET)
add_subdirectory (src/cgame/et)
add_subdirectory (src/game/et)
add_subdirectory (src/ui/et)
add_subdirectory (src/rtcw_et)
endif ()
if (RTCW_ET_DED)
add_subdirectory (src/rtcw_et_ded)
endif ()