forked from BabylonJS/BabylonNative
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
31 lines (26 loc) · 878 Bytes
/
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
# cmake 3.15.3+ because of a c++ regression when swift is enable
cmake_minimum_required(VERSION 3.15.3)
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
project(BabylonNative)
if (APPLE)
# without this option on azure pipelines, there is a mismatch with math.h giving a lot of undefined functions on macOS.
# only enabled for Apple as there is no issue for UWP/WIN32
set(CMAKE_NO_SYSTEM_FROM_IMPORTED TRUE)
endif()
if(ANDROID)
set(BABYLON_NATIVE_PLATFORM "Android")
elseif(APPLE)
set(BABYLON_NATIVE_PLATFORM "Apple")
elseif(WINDOWS_STORE)
set(BABYLON_NATIVE_PLATFORM "UWP")
elseif(WIN32)
set(BABYLON_NATIVE_PLATFORM "Win32")
else()
message(FATAL_ERROR "Unrecognized platform: ${CMAKE_SYSTEM_NAME}")
endif()
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
add_subdirectory(Library)
if(NOT ANDROID)
add_subdirectory(TestApp)
endif()