Support building with OpenEXR 3

Try to find OpenEXR 3 first via the upstream cmake config and fallback to using our FindOpenEXR
This commit is contained in:
Antonio Rojas
2021-04-24 10:17:25 +00:00
committed by Albert Astals Cid
parent 224f892b09
commit 2429c95336
3 changed files with 10 additions and 2 deletions

View File

@ -43,7 +43,10 @@ if (UNIX)
endif()
endif()
find_package(OpenEXR)
find_package(OpenEXR 3.0 CONFIG QUIET)
if(NOT OpenEXR_FOUND)
find_package(OpenEXR)
endif()
set_package_properties(OpenEXR PROPERTIES
TYPE OPTIONAL
PURPOSE "Required for the QImage plugin for OpenEXR images"