-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathCMakeLists.txt
74 lines (55 loc) · 1.44 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
# we need to bump minimal cmake version to 3.29 to enable CMP0156
cmake_minimum_required(VERSION 3.28)
cmake_policy(SET CMP0156 NEW)
project(spargel)
set(CMAKE_CXX_SCAN_FOR_MODULES OFF)
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
include(CTest)
include(AddSpargel)
##------------------
## System Detection
##------------------
if(${CMAKE_SYSTEM_NAME} STREQUAL Android)
set(SPARGEL_IS_ANDROID YES CACHE BOOL "")
else()
set(SPARGEL_IS_ANDROID NO CACHE BOOL "")
endif()
if(${CMAKE_SYSTEM_NAME} STREQUAL Darwin)
set(SPARGEL_IS_MACOS YES CACHE BOOL "")
else()
set(SPARGEL_IS_MACOS NO CACHE BOOL "")
endif()
if(${CMAKE_SYSTEM_NAME} STREQUAL Emscripten)
set(SPARGEL_IS_EMSCRIPTEN YES CACHE BOOL "")
else()
set(SPARGEL_IS_EMSCRIPTEN NO CACHE BOOL "")
endif()
if(${CMAKE_SYSTEM_NAME} STREQUAL Linux)
set(SPARGEL_IS_LINUX YES CACHE BOOL "")
else()
set(SPARGEL_IS_LINUX NO CACHE BOOL "")
endif()
if(${CMAKE_SYSTEM_NAME} STREQUAL Windows)
set(SPARGEL_IS_WINDOWS YES CACHE BOOL "")
else()
set(SPARGEL_IS_WINDOWS NO CACHE BOOL "")
endif()
##---------
## Options
##---------
include(SpargelOptions)
##--------------
## Dependencies
##--------------
include(SpargelDependencies)
##------
## Misc
##------
if (SPARGEL_IS_ANDROID)
set_target_properties(${SPARGEL_ANDROID_TARGET} PROPERTIES OUTPUT_NAME spargeldemo)
endif ()
##---------
## Sources
##---------
add_subdirectory(sample)
add_subdirectory(source)