-
-
Notifications
You must be signed in to change notification settings - Fork 37
/
CMakeLists.txt
96 lines (75 loc) · 2.13 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
cmake_minimum_required(VERSION 3.10)
project(thunder)
set(CMAKE_INSTALL_PREFIX ${CMAKE_BINARY_DIR}/install-root)
set(COMPANY_NAME "FrostSpear")
set(PRODUCT_NAME "Thunder Engine")
set(EDITOR_NAME "WorldEditor")
set(BUILDER_NAME "Builder")
set(COPYRIGHT_AUTHOR "Evgeniy Prikazchikov")
set(ANDROID_VERSION "android-21")
string(TOLOWER ${CMAKE_SYSTEM_NAME} OS_NAME)
if(CMAKE_SYSTEM_PROCESSOR STREQUAL "AMD64")
set(PLATFORM "${OS_NAME}/x86_64")
else()
set(PLATFORM "${OS_NAME}/x86")
endif()
set(ANDROID_STL "c++_shared")
set(osxVersion "10.12")
set(iosVersion "10.0")
set(tvosVersion "10.0")
set(CMAKE_CXX_STANDARD 17)
set(standardLibrary "libc++")
set(desktop NOT ("android" IN_LIST CMAKE_SYSTEM_NAME OR "ios" IN_LIST CMAKE_SYSTEM_NAME OR "tvos" IN_LIST CMAKE_SYSTEM_NAME))
if (APPLE)
set(bundle "${EDITOR_NAME}.app/Contents/MacOS/")
else()
set(bundle "")
endif()
# Configure Git information
execute_process(
COMMAND git rev-parse HEAD
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
OUTPUT_VARIABLE REVISION
OUTPUT_STRIP_TRAILING_WHITESPACE
)
file(READ ${CMAKE_SOURCE_DIR}/legal LEGAL)
file(READ ${CMAKE_SOURCE_DIR}/version.cfg SDK_VERSION)
string(TIMESTAMP YEAR "%Y" UTC)
# Set project properties
set(COPYRIGHT_YEAR ${YEAR})
set(RESOURCE_ROOT "${CMAKE_SOURCE_DIR}/worldeditor/bin/")
set(PREFIX "")
set(LAUNCHER_PATH "launcher")
set(SDK_PATH "sdk/${SDK_VERSION}")
set(PLATFORM_PATH "${SDK_PATH}/${PLATFORM}")
set(BIN_PATH "${PLATFORM_PATH}/bin")
if (UNIX)
set(LIB_PATH "${PLATFORM_PATH}/lib")
else ()
set(LIB_PATH ${BIN_PATH})
endif()
set(STATIC_PATH "${PLATFORM_PATH}/static")
set(INC_PATH "${SDK_PATH}/include")
set(TOOLS_PATH "${SDK_PATH}/tools")
set(PLUGINS_PATH "${BIN_PATH}/plugins")
find_package(Qt5 COMPONENTS
Core
Gui
Widgets
QuickWidgets
Xml
Multimedia
Gamepad
Svg
)
set(QT_BIN_DIR "$ENV{QT5_DIR}/bin")
set(QT_PLUGINS_DIR "$ENV{QT5_DIR}/plugins")
set(QT_QML_DIR "$ENV{QT5_DIR}/qml")
# Add subdirectories
add_subdirectory(thirdparty)
add_subdirectory(engine)
add_subdirectory(modules)
add_subdirectory(worldeditor)
add_subdirectory(builder)
add_subdirectory(tests)
add_subdirectory(build)