forked from darklegion/tremulous
-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
57 lines (46 loc) · 1.34 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
# Author: Victor Roemer wtfbbqhax, <victor@badsec.org>.
cmake_minimum_required(VERSION 3.22)
project("wtfbbqhax/Tremulous" C CXX ASM)
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_C_STANDARD 11)
#set(CMAKE_CXX_VISIBILITY_PRESET hidden)
#set(CMAKE_C_VISIBILITY_PRESET hidden)
if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC")
endif(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
if (NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Debug)
endif()
if(WIN32)
set(MODULE_SUFFIX ".dll")
elseif(APPLE)
option(USE_INTERNAL_SDL2 "" ON)
set(MODULE_SUFFIX ".dylib")
else()
set(MODULE_SUFFIX ".so")
endif()
option(USE_RENDERER_DLOPEN "" ON)
option(USE_INTERNAL_JPEG "" ON)
option(USE_RESTCLIENT "" ON)
include(${CMAKE_SOURCE_DIR}/cmake/build_dir)
include(${CMAKE_SOURCE_DIR}/cmake/debug_cflags)
# Superbuild for Tremulous
add_subdirectory(vendor)
add_subdirectory(vendor/nettle-3.3)
add_subdirectory(vendor/restclient)
add_subdirectory(vendor/jpeg-8c)
# Engine
add_subdirectory(src/server)
add_subdirectory(src/client)
add_subdirectory(src/renderercommon)
add_subdirectory(src/renderergl1)
if(NOT WIN32) # FIXME
add_subdirectory(src/renderergl2)
endif()
# Game Modules
add_subdirectory(src/ui)
add_subdirectory(src/game)
add_subdirectory(src/cgame)
# Assets
add_subdirectory(assets)