Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hide optix related cmake warnings #1032

Merged
merged 2 commits into from
Aug 12, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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