-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
72 lines (59 loc) · 1.43 KB
/
CMakeLists.txt
File metadata and controls
72 lines (59 loc) · 1.43 KB
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
cmake_minimum_required(VERSION 2.8.0)
cmake_policy(SET CMP0022 NEW)
project(ReverseTale-Library)
# ---[ Includes
set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake-utils)
# -[ Macros and functions
include(Configure)
include(Macros)
include(External)
ResetAllTargets()
# ---[ Create project
CreateTarget(TARGET ReverseTale-Library)
set(SOURCE_FOLDERS
${CMAKE_CURRENT_SOURCE_DIR}/src
${CMAKE_CURRENT_SOURCE_DIR}/src/Cryptography
${CMAKE_CURRENT_SOURCE_DIR}/src/Tools
${CMAKE_CURRENT_SOURCE_DIR}/src/Game
)
foreach(folder ${SOURCE_FOLDERS})
get_filename_component(FOLDER_NAME ${folder} NAME)
AddToSources(
TARGET ReverseTale-Library
SRC_PATH ${folder}
GLOB_SEARCH ".hpp;.cpp"
FOLDER_NAME ${FOLDER_NAME}
)
endforeach()
# ---[ Load dependencies
add_subdirectory(dep)
ResolveExternal(TARGET ReverseTale-Library)
if (ReverseTale-Library_IS_RESOLVED)
# ---[ Setup include directories
AddToIncludes(
TARGET ReverseTale-Library
INC_PATH ${CMAKE_CURRENT_SOURCE_DIR}/include
)
# AddToIncludes(
# TARGET ReverseTale-Library
# INC_PATH ${PROJECT_BINARY_DIR}
# )
# ---[ Setup some definitions
set(DEFINITIONS "")
if (NOT ${DEBUG})
set(DEFINITIONS "${DEFINITIONS} NDEBUG=1")
endif()
AddLibrary(
TARGET ReverseTale-Library
LIBRARY ws2_32
PLATFORM WIN32
)
BuildNow(
TARGET ReverseTale-Library
DEFINES ${DEFINITIONS}
STATIC_LIB
OUTPUT_NAME Library
C++11
)
MakeInstallable(TARGET ReverseTale-Library)
endif()