-
Notifications
You must be signed in to change notification settings - Fork 45
/
Copy pathCMakeLists.txt
47 lines (42 loc) · 1.04 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
cmake_minimum_required (VERSION 2.6)
set(OPENXR
1
)
if (OPENXR)
project(BlenderXR_OpenXR)
else()
project(BlenderXR_SteamVR)
endif()
macro(use_cxx11)
if (CMAKE_VERSION VERSION_LESS "3.1")
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++11")
endif()
else()
set (CMAKE_CXX_STANDARD 11)
endif()
endmacro(use_cxx11)
add_subdirectory(${PROJECT_SOURCE_DIR}/src)
if(OPENXR)
# OpenXR
if(APPLE)
set_target_properties (${PROJECT_NAME}
PROPERTIES
LIBRARY_OUTPUT_DIRECTORY "${PROJECT_SOURCE_DIR}/bin/MacOS/OpenXR")
else()
set_target_properties (${PROJECT_NAME}
PROPERTIES
LIBRARY_OUTPUT_DIRECTORY "${PROJECT_SOURCE_DIR}/bin/Linux/OpenXR")
endif()
else()
# SteamVR
if(APPLE)
set_target_properties (${PROJECT_NAME}
PROPERTIES
LIBRARY_OUTPUT_DIRECTORY "${PROJECT_SOURCE_DIR}/bin/MacOS/SteamVR")
else()
set_target_properties (${PROJECT_NAME}
PROPERTIES
LIBRARY_OUTPUT_DIRECTORY "${PROJECT_SOURCE_DIR}/bin/Linux/SteamVR")
endif()
endif()