-
Notifications
You must be signed in to change notification settings - Fork 207
/
CMakeLists.txt
35 lines (29 loc) · 1.29 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
cmake_minimum_required (VERSION 3.22)
project (yocto_gl VERSION 4.0 LANGUAGES C CXX)
option(YOCTO_APPS "Build apps" ON)
option(YOCTO_OPENGL "Enable OpenGL" ON)
option(YOCTO_DENOISE "Enable denoising with Intel's OIDN" OFF)
option(YOCTO_EMBREE "Enable ray casting with Intel's Embree" OFF)
option(YOCTO_CUDA "Enable ray casting with Optix and Cuda" OFF)
option(YOCTO_TESTING "Enable testing" OFF)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
set(CMAKE_BUILD_TYPE "RelWithDebInfo")
endif()
set(CMAKE_BINARY_DIR ${CMAKE_SOURCE_DIR}/bin)
if(NOT GENERATOR_IS_MULTI_CONFIG AND CMAKE_BUILD_TYPE MATCHES Debug)
set(CMAKE_BINARY_DIR ${CMAKE_SOURCE_DIR}/bin/debug)
endif(NOT GENERATOR_IS_MULTI_CONFIG AND CMAKE_BUILD_TYPE MATCHES Debug)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
if(GENERATOR_IS_MULTI_CONFIG)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_RELEASE ${CMAKE_BINARY_DIR})
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE ${CMAKE_BINARY_DIR})
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE ${CMAKE_BINARY_DIR})
endif(GENERATOR_IS_MULTI_CONFIG)
add_subdirectory(exts)
add_subdirectory(libs)
if(YOCTO_APPS)
add_subdirectory(apps)
endif(YOCTO_APPS)