Skip to content

Commit 6a82b3f

Browse files
committed
automatically fetch OptiX headers from GitHub
1 parent ac8d9a4 commit 6a82b3f

File tree

2 files changed

+23
-3
lines changed

2 files changed

+23
-3
lines changed

README.md

+2-3
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,8 @@ Building VisRTX requires the following:
2828

2929
- CMake 3.17+
3030
- C++17 compiler
31-
- NVIDIA Driver 495+
32-
- CUDA 11.3.1+
33-
- [OptiX 7.4+](https://developer.nvidia.com/rtx/ray-tracing/optix)
31+
- NVIDIA Driver 530+
32+
- CUDA 12+
3433
- [ANARI-SDK](https://github.com/KhronosGroup/ANARI-SDK)
3534

3635
Building VisRTX is done through invoking CMake on the source directory from a

devices/rtx/CMakeLists.txt

+21
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,27 @@ set(CMAKE_CUDA_STANDARD_REQUIRED ON)
4949
set(CMAKE_CXX_VISIBILITY_PRESET hidden)
5050
set(CMAKE_VISIBILITY_INLINES_HIDDEN TRUE)
5151

52+
## Get OptiX headers ##
53+
54+
set(OPTIX_FETCH_VERSION "7.7" CACHE STRING "Version of OptiX to get")
55+
set_property(CACHE OPTIX_FETCH_VERSION
56+
PROPERTY STRINGS "7.7" "8.0" "8.1" "9.0")
57+
58+
if(${OPTIX_FETCH_VERSION} STREQUAL "7.7")
59+
set(OPTIX_URL https://github.com/NVIDIA/optix-dev/archive/refs/tags/v7.7.0.zip)
60+
elseif(${OPTIX_FETCH_VERSION} STREQUAL "8.0")
61+
set(OPTIX_URL https://github.com/NVIDIA/optix-dev/archive/refs/tags/v8.0.0.zip)
62+
elseif(${OPTIX_FETCH_VERSION} STREQUAL "8.1")
63+
set(OPTIX_URL https://github.com/NVIDIA/optix-dev/archive/refs/tags/v8.1.0.zip)
64+
elseif(${OPTIX_FETCH_VERSION} STREQUAL "9.0")
65+
set(OPTIX_URL https://github.com/NVIDIA/optix-dev/archive/refs/tags/v9.0.0.zip)
66+
else()
67+
message(FATAL_ERROR "Invalid/unknown version of OptiX selected")
68+
endif()
69+
70+
anari_sdk_fetch_project(NAME optix_headers URL ${OPTIX_URL})
71+
list(APPEND CMAKE_PREFIX_PATH ${optix_headers_LOCATION})
72+
5273
## Find dependencies ##
5374

5475
find_package(CUDAToolkit 11.3.1 REQUIRED)

0 commit comments

Comments
 (0)