This repository has been archived by the owner on Oct 25, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathCMakeLists.txt
52 lines (44 loc) · 1.81 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
if (POLICY CMP0048)
cmake_policy(SET CMP0048 NEW)
endif (POLICY CMP0048)
project(optix7course VERSION 1.0.1)
cmake_minimum_required(VERSION 2.8)
if (NOT WIN32)
# visual studio doesn't like these (not need them):
set (CMAKE_CXX_FLAGS "--std=c++11")
set (CUDA_PROPAGATE_HOST_FLAGS ON)
endif()
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/cmake/")
include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/configure_optix.cmake)
mark_as_advanced(CUDA_SDK_ROOT_DIR)
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/common/3rdParty/glm)
include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/configure_slang.cmake)
# ------------------------------------------------------------------
# build glfw
# ------------------------------------------------------------------
set(OpenGL_GL_PREFERENCE LEGACY)
if (WIN32)
set(glfw_dir ${PROJECT_SOURCE_DIR}/common/3rdParty/glfw/)
include_directories(${glfw_dir}/include)
add_subdirectory(${glfw_dir} EXCLUDE_FROM_ALL)
else()
find_package(glfw3 REQUIRED)
endif()
include_directories(common)
set(GLFW_BUILD_DOCS OFF CACHE STRING "" FORCE)
set(GLFW_BUILD_EXAMPLES OFF CACHE STRING "" FORCE)
set(GLFW_BUILD_TESTS OFF CACHE STRING "" FORCE)
set(GLFW_INSTALL OFF CACHE STRING "" FORCE)
add_subdirectory(common/glfWindow EXCLUDE_FROM_ALL)
# ------------------------------------------------------------------
# and final build rules for the project
# ------------------------------------------------------------------
add_subdirectory(example01_helloOptix)
add_subdirectory(example02_pipelineAndRayGen)
add_subdirectory(example03_inGLFWindow)
add_subdirectory(example04_firstTriangleMesh)
add_subdirectory(example05_firstSBTData)
add_subdirectory(example06_multipleObjects)
add_subdirectory(example07_firstRealModel)
add_subdirectory(example08_addingTextures)
add_subdirectory(example09_shadowRays)