forked from gameplay3d/gameplay
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
63 lines (48 loc) · 1.6 KB
/
CMakeLists.txt
File metadata and controls
63 lines (48 loc) · 1.6 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
cmake_minimum_required(VERSION 3.10...3.27)
project(GamePlay)
set(GAMEPLAY_VERSION 3.0.0)
set(CMAKE_CXX_STANDARD 17)
# debug
message( "CMAKE_BUILD_TYPE: ${CMAKE_BUILD_TYPE}" )
if ( "${CMAKE_BUILD_TYPE}" STREQUAL "DEBUG" )
add_definitions(-D_DEBUG)
endif()
# ARCH detection
if (ANDROID)
set(ARCH ${ANDROID_ARCH_NAME})
elseif(IOS)
if (PLATFORM STREQUAL "OS64")
set(ARCH "arm")
else (PLATFORM STREQUAL "OS64")
set(ARCH "x86")
endif (PLATFORM STREQUAL "OS64")
else(IOS)
# Skip any introspection for cross-compiling targets
include(${PROJECT_SOURCE_DIR}/cmake/TargetArch.cmake)
target_architecture(ARCH)
endif(ANDROID)
string(TOLOWER ${CMAKE_SYSTEM_NAME} LOWER_SYSTEM_NAME)
set(CMAKE_INSTALL_PREFIX "${PROJECT_SOURCE_DIR}/out")
set(LIBRARY_OUTPUT_PATH "${PROJECT_SOURCE_DIR}/out/lib/${LOWER_SYSTEM_NAME}/${ARCH}")
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${LIBRARY_OUTPUT_PATH})
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${LIBRARY_OUTPUT_PATH})
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${LIBRARY_OUTPUT_PATH})
file(MAKE_DIRECTORY ${LIBRARY_OUTPUT_PATH})
message(STATUS "Directory: ${LIBRARY_OUTPUT_PATH}")
if (GP_NO_PLATFORM)
add_definitions(-DGP_NO_PLATFORM=1)
endif (GP_NO_PLATFORM)
if (GP_NO_LUA_BINDINGS)
add_definitions(-DGP_NO_LUA_BINDINGS=1)
endif (GP_NO_LUA_BINDINGS)
if (GP_NO_UI)
add_definitions(-DGP_NO_UI=1)
endif (GP_NO_UI)
# gameplay library
add_subdirectory(gameplay)
# gameplay samples
#add_subdirectory(samples)
# gameplay encoder
# A pre-compiled executable can be found in 'gameplay/bin'. Uncomment to build yourself.
#add_subdirectory(tools/encoder)
#add_subdirectory(tools/luagen)