forked from AtomicGameEngine/AtomicGameEngine
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
75 lines (53 loc) · 2.16 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
project (Atomic)
cmake_minimum_required(VERSION 2.8.12.1)
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 )
include (AtomicPlatform)
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()
set(CEF_ROOT "${CMAKE_SOURCE_DIR}/Submodules/CEF/MacOSX")
elseif(MSVC)
if (ATOMIC_PROJECT_ARCH STREQUAL "x86")
else()
set(CEF_ROOT "${CMAKE_SOURCE_DIR}/Submodules/CEF/Windows/64bit")
endif()
else()
set(CEF_ROOT "${CMAKE_SOURCE_DIR}/Submodules/CEF/Linux")
endif()
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CEF_ROOT}/cmake")
find_package(CEF REQUIRED)
include_directories(${CEF_ROOT})
add_subdirectory(${CEF_LIBCEF_DLL_WRAPPER_PATH} libcef_dll_wrapper)
endif()
add_subdirectory(Source)