-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
88 lines (63 loc) · 1.7 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
cmake_minimum_required(VERSION 3.16)
project(TextBasedGameEngine)
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
set(Boost_USE_STATIC_LIBS OFF)
# set(Boost_USE_MULTITHREADED ON)
set(Boost_USE_STATIC_RUNTIME OFF)
# find_package(Boost 1.74.0 )
# find_package(Boost COMPONENTS serialization REQUIRED)
if(WIN32)
find_package(Boost)
else()
find_package(Boost COMPONENTS serialization REQUIRED)
endif()
if(Boost_FOUND)
include_directories(${Boost_INCLUDE_DIRS})
if(WIN32)
include_directories(${Boost_INCLUDE_DIRS}/boost/serialization)
endif()
endif()
add_subdirectory(Cli-Kit)
include_directories(Cli-Kit)
include_directories(include)
# Add source files
set(SOURCES
src/achievements/achievement.cpp
src/item/item.cpp
src/player/inventory.cpp
src/player/player.cpp
src/node/node.cpp
src/progress/progress.cpp
src/utils/prompt.cpp
src/utils/game_utils.cpp
# src/utils/threads.cpp
src/map/map.cpp
src/mission/mission.cpp
src/mission/objective.cpp
)
set(INCLUDE
engine.h
include/achievement.h
include/boost_serialization_includes.h
include/command.h
include/item.h
include/inventory.h
include/player.h
include/node.h
include/progress.h
include/prompt.h
include/game_utils.h
# include/threads.h
include/map.h
include/mission.h
include/objective.h
)
# add_executable(TextBasedGameEngine ${SOURCES})
add_library(${PROJECT_NAME} ${SOURCES} ${INCLUDE})
target_link_libraries(${PROJECT_NAME} CliKit)
if(WIN32)
target_link_libraries(${PROJECT_NAME} serialization)
else()
target_link_libraries(${PROJECT_NAME} Boost::serialization)
endif()