forked from AtomicGameEngine/AtomicGameEngine
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
97 lines (68 loc) · 2.54 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
97
project (Atomic)
cmake_minimum_required (VERSION 2.8)
set (CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/Build/CMake/Modules)
include(AtomicUtils)
add_definitions(-DATOMIC_ROOT_SOURCE_DIR="${CMAKE_SOURCE_DIR}" -DATOMIC_ROOT_BUILD_DIR="${CMAKE_BINARY_DIR}")
add_definitions( -DATOMIC_API= -DATOMIC_STATIC_DEFINE -DATOMIC_ATOMIC2D -DATOMIC_LOGGING -DATOMIC_PROFILING)
if (NOT DEFINED ATOMIC_DEV_BUILD)
set(ATOMIC_DEV_BUILD 1)
ENDIF()
if (ATOMIC_DEV_BUILD)
add_definitions("-DATOMIC_DEV_BUILD=1")
endif()
# Disable until https://github.com/AtomicGameEngine/AtomicGameEngine/issues/554 is addressed
# add_definitions("-DATOMIC_SOURCE_BUILD=1")
# this is here as QtCreator is having trouble picking up #include <Atomic/*> without it
include_directories(${CMAKE_SOURCE_DIR}/Source ${CMAKE_SOURCE_DIR}/Source/AtomicEditor/Source)
set (ATOMIC_LINK_LIBRARIES Atomic Box2D Duktape TurboBadger FreeType JO LZ4 PugiXml STB)
if (NOT ATOMIC_BUILD_2D)
add_definitions( -DATOMIC_PHYSICS -DATOMIC_3D)
set (ATOMIC_LINK_LIBRARIES ${ATOMIC_LINK_LIBRARIES} Bullet StanHull)
endif()
if (NOT EMSCRIPTEN)
add_definitions( -DATOMIC_NETWORK)
set (ATOMIC_LINK_LIBRARIES ${ATOMIC_LINK_LIBRARIES} SDL Civetweb Recast Detour DetourCrowd DetourTileCache kNet libcurl )
endif()
add_definitions( -DATOMIC_WEB )
if (MSVC)
include(AtomicWindows)
elseif(APPLE)
if (IOS)
include(AtomicIOS)
else()
include(AtomicMac)
endif()
elseif(LINUX)
include(AtomicLinux)
elseif(ANDROID)
include(AtomicAndroid)
elseif(EMSCRIPTEN)
include(AtomicWeb)
endif()
find_program(CLDOC cldoc)
if(CLDOC)
add_custom_target(docs DEPENDS AtomicEngineDocs)
endif()
if (ATOMIC_WEBVIEW)
if(APPLE)
if(POLICY CMP0037)
# new cmake doesn't like creating framework whose name has spaces
# which CEF3 scripts (including shell) currently require on OSX
cmake_policy(SET CMP0037 OLD)
endif()
include_directories (${CMAKE_SOURCE_DIR}/Submodules/CEF/MacOSX/)
add_subdirectory(Submodules/CEF/MacOSX/libcef_dll)
elseif(MSVC)
if (ATOMIC_PROJECT_ARCH STREQUAL "x86")
include_directories (${CMAKE_SOURCE_DIR}/Submodules/CEF/Windows/32bit)
add_subdirectory(Submodules/CEF/Windows/32bit/libcef_dll)
else()
include_directories (${CMAKE_SOURCE_DIR}/Submodules/CEF/Windows/64bit)
add_subdirectory(Submodules/CEF/Windows/64bit/libcef_dll)
endif()
else()
include_directories (${CMAKE_SOURCE_DIR}/Submodules/CEF/Linux)
add_subdirectory(Submodules/CEF/Linux/libcef_dll)
endif()
endif()
add_subdirectory(Source)