Skip to content

Commit

Permalink
Fix build with OpenEXR 3
Browse files Browse the repository at this point in the history
Try to find openexr 3 via the upstream cmake config first, and fall back to using our FindOpenEXR.cmake
  • Loading branch information
antonio-rojas authored and TurboGit committed Apr 26, 2021
1 parent e33eb14 commit a9c229d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/CMakeLists.txt
Expand Up @@ -329,7 +329,12 @@ if(USE_CAMERA_SUPPORT)
endif(USE_CAMERA_SUPPORT)

if(USE_OPENEXR)
find_package(OpenEXR)
find_package(OpenEXR 3.0 CONFIG)
if(TARGET OpenEXR::OpenEXR)
set(OpenEXR_LIBRARIES OpenEXR::OpenEXR)
else()
find_package(OpenEXR)
endif()
if(OpenEXR_FOUND)
include_directories(SYSTEM ${OpenEXR_INCLUDE_DIRS})
list(APPEND LIBS ${OpenEXR_LIBRARIES})
Expand Down

0 comments on commit a9c229d

Please sign in to comment.