-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
51 lines (42 loc) · 994 Bytes
/
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
cmake_minimum_required(VERSION 3.16.2)
#cmake_policy(SET CMP0048 OLD) # plog warnings?
project(
DemoServer
VERSION 1.0.0
DESCRIPTION "Real-time UDP game server"
LANGUAGES CXX
)
### Settings
if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME)
set(CMAKE_CXX_EXTENSIONS OFF)
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
include(CTest) # only in debug?
endif()
### Dependencies
include(FetchContent)
FetchContent_Declare(
pugixml
GIT_REPOSITORY https://github.com/zeux/pugixml.git
GIT_TAG v1.10
)
FetchContent_Declare(
plog
GIT_REPOSITORY https://github.com/SergiusTheBest/plog.git
GIT_TAG 1.1.5 # previous working: 1.1.0, new 1.1.5
)
FetchContent_MakeAvailable(pugixml plog)
set(Boost_DEBUG ON)
set(Boost_USE_STATIC_LIBS ON)
set(Boost_ARCHITECTURE -x64)
#set(Boost_LIB_PREFIX lib)
find_package(
Boost
1.71.0 EXACT
REQUIRED
COMPONENTS thread
)
### Other
add_subdirectory(src)
if((CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME) AND BUILD_TESTING)
add_subdirectory(tests)
endif()