forked from drakeshin/AtomicGameEngine
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
72 lines (56 loc) · 1.9 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
project(Atomic)
cmake_minimum_required(VERSION 2.8.12.1)
set(ATOMIC_SOURCE_DIR ${Atomic_SOURCE_DIR})
set(CMAKE_MODULE_PATH ${ATOMIC_SOURCE_DIR}/Build/CMake/Modules)
include(AtomicGit)
include(AtomicUtils)
include(AtomicCommon)
if ("${CMAKE_BUILD_TYPE}" STREQUAL "Release")
set (ATOMIC_RELEASE_OFF OFF)
set (ATOMIC_RELEASE_ON ON)
else ()
set (ATOMIC_RELEASE_OFF ON)
set (ATOMIC_RELEASE_ON OFF)
endif ()
add_definitions(-DATOMIC_ROOT_SOURCE_DIR="${ATOMIC_SOURCE_DIR}" -DATOMIC_ROOT_BUILD_DIR="${CMAKE_BINARY_DIR}")
if (NOT DEFINED ATOMIC_DEV_BUILD)
set(ATOMIC_DEV_BUILD 1)
ENDIF ()
if (ATOMIC_DEV_BUILD)
add_definitions("-DATOMIC_DEV_BUILD=1")
endif ()
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 "${ATOMIC_SOURCE_DIR}/Submodules/CEF/MacOSX")
elseif (WIN32)
if (ATOMIC_PROJECT_ARCH STREQUAL "x86")
else ()
set(CEF_ROOT "${ATOMIC_SOURCE_DIR}/Submodules/CEF/Windows/64bit")
endif ()
else ()
set(CEF_ROOT "${ATOMIC_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)
if (ATOMIC_DESKTOP AND ATOMIC_DEV_BUILD)
if (NOT DEFINED ATOMIC_CPLUSPLUS_EXAMPLES)
set(ATOMIC_CPLUSPLUS_EXAMPLES 1)
endif ()
if (ATOMIC_CPLUSPLUS_EXAMPLES)
add_subdirectory(Submodules/AtomicExamples/FeatureExamples/CPlusPlus)
endif ()
endif ()