forked from cpvrlab/SLProject
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
executable file
·83 lines (65 loc) · 3.1 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
75
76
77
78
79
80
81
82
83
#
# CMake top-level configuration of SLProject
#
cmake_minimum_required(VERSION 3.3 FATAL_ERROR)
if (APPLE)
set(CMAKE_MACOSX_RPATH OFF)
endif (APPLE)
set(SL_PROJECT_ROOT "${CMAKE_CURRENT_SOURCE_DIR}")
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${SL_PROJECT_ROOT}/cmake/")
# Register general cmake commands (set_policy, source_group_by_path, list_extract)
include(cmake/CustomCommands.cmake)
# The FOLDER properties are needed in Visual Studio and XCode generated projects for nested folders
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
set_property(GLOBAL PROPERTY PREDEFINED_TARGETS_FOLDER "")
set_policy(CMP0111 OLD) # Avoids warnings for new policy CMP0111 from cmake 3.19 onwards
set(META_PROJECT_NAME "SLProject")
# Declare project
project(${META_PROJECT_NAME} C CXX)
# Set output directories
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR})
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR})
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR})
option(SL_DOWNLOAD_PREBUILTS "Specifies if prebuilt libraries should be downloaded" ON)
option(SL_BUILD_WAI "Specifies if the WAI library should be built" ON)
option(SL_BUILD_APPS "Specifies if sample apps should be built" ON)
option(SL_BUILD_EXERCISES "Specifies if exercise apps should be built" ON)
option(SL_BUILD_VULKAN_APPS "Specifies if vulkan apps should be built" OFF)
option(SL_BUILD_WITH_OPTIX "Specifies if Optix renderer should be built" OFF)
option(SL_BUILD_WITH_KTX "Specifies if Kronos Texture library (ktx) should be used" ON)
option(SL_BUILD_WITH_OPENSSL "Specifies if OpenSSL should be used" ON)
option(SL_BUILD_WITH_ASSIMP "Specifies if Assimp should be used" ON)
option(LIBIGL_USE_STATIC_LIBRARY "Specifies if LibIGL should be built statically" ON)
message(STATUS "SL_DOWNLOAD_PREBUILTS: ${SL_DOWNLOAD_PREBUILTS}")
message(STATUS "SL_BUILD_WAI: ${SL_BUILD_WAI}")
message(STATUS "SL_BUILD_APPS: ${SL_BUILD_APPS}")
message(STATUS "SL_BUILD_EXERCISES: ${SL_BUILD_EXERCISES}")
message(STATUS "SL_BUILD_VULKAN_APPS: ${SL_BUILD_VULKAN_APPS}")
message(STATUS "SL_BUILD_WITH_OPTIX: ${SL_BUILD_WITH_OPTIX}")
message(STATUS "SL_BUILD_WITH_KTX: ${SL_BUILD_WITH_KTX}")
message(STATUS "SL_BUILD_WITH_OPENSSL: ${SL_BUILD_WITH_OPENSSL}")
message(STATUS "SL_BUILD_WITH_ASSIMP: ${SL_BUILD_WITH_ASSIMP}")
message(STATUS "LIBIGL_USE_STATIC_LIBRARY: ${LIBIGL_USE_STATIC_LIBRARY}")
include(cmake/SetGitBranchNameAndCommitID.cmake)
include(cmake/CompileOptions.cmake)
include(cmake/ConfigureMSVCCLion.cmake)
if (SL_DOWNLOAD_PREBUILTS)
include(cmake/DownloadPrebuilts.cmake)
endif()
if("${CMAKE_SYSTEM_NAME}" MATCHES "Android")
message(STATUS "SL_APP: ${SL_APP}")
option(SL_APP
"Specifies which sample app should be built (used for android)"
SL_APP_ALL)
endif()
add_subdirectory(modules/sens)
add_subdirectory(modules/sl)
add_subdirectory(modules/math)
add_subdirectory(modules/utils)
#add_subdirectory(experimental)
if(SL_BUILD_WAI)
add_subdirectory(modules/wai)
endif()
if (SL_BUILD_APPS)
add_subdirectory(apps)
endif()