forked from nvpro-samples/vk_raytracing_tutorial_KHR
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
58 lines (50 loc) · 2.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
cmake_minimum_required(VERSION 3.9.6 FATAL_ERROR)
project(vk_raytracing_tutorial)
#--------------------------------------------------------------------------------------------------
# look for shared_sources 1) as a sub-folder 2) at some other locations
# this cannot be put anywhere else since we still didn't find CMakeLists_include.txt yet
if(NOT BASE_DIRECTORY)
SET(BASE_DIRECTORY "" CACHE FILEPATH "folder containing shared_sources")
SET(ADD_SUBDIR_BELOW 1)
find_path(BASE_DIRECTORY2
NAMES shared_sources
PATHS ${CMAKE_CURRENT_SOURCE_DIR}/../.. ${CMAKE_CURRENT_SOURCE_DIR}/.. ${CMAKE_CURRENT_SOURCE_DIR}
REQUIRED
DOC "Couldn't find shared_source directory'"
)
SET(BASE_DIRECTORY ${BASE_DIRECTORY2} )
endif()
## Various functions and macros REQUIRED
include(${BASE_DIRECTORY}/shared_sources/CMakeLists_include.txt)
set(TUTO_KHR_DIR ${CMAKE_CURRENT_SOURCE_DIR})
# presets and utility functions used in all CMakeLists
include(utilities.cmake)
#--------------------------------------------------------------------------------------------------
# Package shared by all projects
_add_package_VulkanSDK()
_add_package_OpenGL()
_add_package_ImGUI()
_add_package_ZLIB()
_add_shared_sources_lib()
message(STATUS "COPY ${CMAKE_CURRENT_SOURCE_DIR}/media to ${EXECUTABLE_OUTPUT_PATH}")
file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/media DESTINATION ${EXECUTABLE_OUTPUT_PATH})
#--------------------------------------------------------------------------------------------------
# Sub examples
# add_subdirectory(ray_tracing__advance)
# add_subdirectory(ray_tracing__before)
# add_subdirectory(ray_tracing__simple)
#
# add_subdirectory(ray_tracing_animation)
# add_subdirectory(ray_tracing_anyhit)
# add_subdirectory(ray_tracing_callable)
# add_subdirectory(ray_tracing_gltf)
# add_subdirectory(ray_tracing_instances)
# add_subdirectory(ray_tracing_intersection)
# add_subdirectory(ray_tracing_jitter_cam)
# add_subdirectory(ray_tracing_manyhits)
# add_subdirectory(ray_tracing_rayquery)
# add_subdirectory(ray_tracing_reflections)
#
# add_subdirectory(ray_tracing_indirect_scissor)
#
add_subdirectory(ray_tracing__simple)