cmake: use find_package(OpenEXR) to support OpenEXR 3+

This commit is contained in:
Alexander Alekhin
2021-12-23 10:39:43 +00:00
parent 19ac54277b
commit f43fec7ee6
4 changed files with 25 additions and 2 deletions

View File

@@ -241,6 +241,7 @@ if(WITH_OPENEXR)
add_subdirectory("${OpenCV_SOURCE_DIR}/3rdparty/openexr")
if(OPENEXR_VERSION) # check via TARGET doesn't work
set(HAVE_OPENEXR YES)
set(BUILD_OPENEXR ON)
endif()
endif()
endif()