-
Notifications
You must be signed in to change notification settings - Fork 104
/
CMakeLists.txt
115 lines (96 loc) · 3.25 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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
cmake_minimum_required (VERSION 2.8)
project (Lithtech)
option(BUILD_ENGINE "Build engine" ON)
option(BUILD_NOLF2 "Build No One Lives Forever 2 game code" ON)
option(BUILD_TRON "Build Tron 2.0 game code" OFF)
option(BUILD_BLOOD2 "Build Blood II game code" OFF)
option(BUILD_FEAR "Build F.E.A.R. game code" OFF)
option(BUILD_NOLF "Build No One Lives Forever game code" OFF)
option(BUILD_SHOGO "Build Shogo game code" OFF)
option(BUILD_TOOLS "Build tools" OFF)
option(ENABLE_D3D "Enable Direct3D" ON)
option(ENABLE_DIRECTX "Enable DirectX" ON)
option(ENABLE_DIRECTSHOW "Enable DirectShow" ON)
option(USE_INTERNAL_ZLIB "Use bundled zlib" ON) # eventually want default to be OFF
option(USE_INTERNAL_FREETYPE "Use bundled freetype" ON) # eventually want default to be OFF
if(ENABLE_D3D)
add_definitions(-D__D3D -D__D3DREND)
endif(ENABLE_D3D)
if(USE_INTERNAL_ZLIB)
#set zlib vars
add_subdirectory(libs/zlib)
else(USE_INTERNAL_ZLIB)
find_package(ZLIB)
endif(USE_INTERNAL_ZLIB)
# move to Lib_UI CMakeLists.txt?
if(USE_INTERNAL_FREETYPE)
#set freetype vars
else(USE_INTERNAL_FREETYPE)
find_package(Freetype)
endif(USE_INTERNAL_FREETYPE)
if(WIN32)
add_definitions(-D_WINDOWS)
else(WIN32)
add_definitions(-D_LINUX -D__LINUX)
endif(WIN32)
if(MSVC)
add_definitions(-D_CRT_SECURE_NO_WARNINGS)
endif(MSVC)
if(DEBUG)
add_definitions(-D_DEBUG)
else(DEBUG)
add_definitions(-D_FINAL)
endif(DEBUG)
add_subdirectory(libs/lith) # Lib_Lith
add_subdirectory(libs/stdlith) # Lib_StdLith
add_subdirectory(libs/ltmem) # ltmem
add_subdirectory(libs/rezmgr) # Lib_RezMgr
if(BUILD_ENGINE)
add_subdirectory(runtime/ui) # Lib_UI
add_subdirectory(runtime/info) # Lib_Info
add_subdirectory(runtime/sound) # Lib_ILTSound
add_subdirectory(runtime/server) # DLL_Server
add_subdirectory(runtime/client) # EXE_Lithtech
if(ENABLE_D3D)
add_subdirectory(runtime/render_a/src/sys/d3d)
endif(ENABLE_D3D)
if(ENABLE_DIRECTX)
add_subdirectory(runtime/sound/src/sys/s_dx8)
endif(ENABLE_DIRECTX)
if(ENABLE_DIRECTSHOW)
add_subdirectory(libs/Lib_DShow)
endif(ENABLE_DIRECTSHOW)
if(WIN32)
add_subdirectory(runtime/winbuild/ltmsg)
endif(WIN32)
endif(BUILD_ENGINE)
if(BUILD_NOLF2)
add_subdirectory(libs/MFCStub)
add_subdirectory(libs/ButeMgr)
add_subdirectory(libs/CryptMgr)
add_subdirectory(libs/RegMgr)
add_subdirectory(libs/LTGUIMgr)
add_subdirectory(libs/ServerDir)
add_subdirectory(libs/WONAPI)
add_subdirectory(NOLF2/ClientFxDLL) # ClientFXDLL
add_subdirectory(NOLF2/ClientRes/TO2) # ClientRes
add_subdirectory(NOLF2/ClientShellDLL/TO2) # ClientShellDLL
add_subdirectory(NOLF2/ObjectDLL/TO2) # ObjectDLL
add_subdirectory(NOLF2/ServerRes/TO2) # ServerRes
endif(BUILD_NOLF2)
if(BUILD_TRON)
if(NOT BUILD_NOLF2)
add_subdirectory(libs/MFCStub)
add_subdirectory(libs/ButeMgr)
add_subdirectory(libs/CryptMgr)
add_subdirectory(libs/RegMgr)
add_subdirectory(libs/LTGUIMgr)
add_subdirectory(libs/ServerDir)
add_subdirectory(libs/WONAPI)
add_subdirectory(NOLF2/ClientFxDLL) # ClientFXDLL
endif(NOT BUILD_NOLF2)
add_subdirectory(NOLF2/ClientRes/TRON) # ClientRes
add_subdirectory(NOLF2/ClientShellDLL/TRON) # ClientShellDLL
add_subdirectory(NOLF2/ObjectDLL/TRON) # ObjectDLL
add_subdirectory(NOLF2/ServerRes/TRON) # ServerRes
endif(BUILD_TRON)