Skip to content

Commit

Permalink
Silence cmake warnings on optix
Browse files Browse the repository at this point in the history
Signed-off-by: Ian Chen <[email protected]>
  • Loading branch information
iche033 committed Aug 7, 2024
1 parent ea3ff7d commit b0cedda
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,6 @@ set(GZ_PLUGIN_VER ${gz-plugin3_VERSION_MAJOR})
gz_find_package(gz-utils3 REQUIRED)
set(GZ_UTILS_VER ${gz-utils3_VERSION_MAJOR})

#--------------------------------------
# Find FreeImage
gz_find_package(FreeImage VERSION 3.9
REQUIRED_BY optix
PRIVATE_FOR optix)

#--------------------------------------
# Find OpenGL
# See CMP0072 for more details (cmake --help-policy CMP0072)
Expand Down Expand Up @@ -169,20 +163,24 @@ set(GZ_RENDERING_ENGINE_INSTALL_DIR
#--------------------------------------
# Find dependencies that we ignore for Visual Studio
if(NOT MSVC)
#--------------------------------------
# Find FreeImage
gz_find_package(FreeImage VERSION 3.9
REQUIRED_BY optix
PRIVATE_FOR optix)

#--------------------------------------
# Find CUDA
# Module is being removed in CMake and needs a non trivial
# migration https://cmake.org/cmake/help/latest/policy/CMP0146.html
if(POLICY CMP0146)
cmake_policy(SET CMP0146 OLD)
endif()
find_package(CUDA)
find_package(CUDA QUIET)

#--------------------------------------
# Find OptiX
gz_find_package(OptiX VERSION 3.8.0
REQUIRED_BY optix
PRIVATE_FOR optix)
gz_find_package(OptiX QUIET VERSION 3.8.0)

if (OptiX_FOUND AND CUDA_FOUND)
set(GZ_RENDERING_HAVE_OPTIX TRUE)
Expand Down

0 comments on commit b0cedda

Please sign in to comment.