2020-04-23 18:23:32 +01:00
|
|
|
diff --git a/cmake/OpenCVFindLibsGrfmt.cmake b/cmake/OpenCVFindLibsGrfmt.cmake
|
2021-04-11 23:01:59 +01:00
|
|
|
index 23a6ca6959..27e121943a 100644
|
2020-04-23 18:23:32 +01:00
|
|
|
--- a/cmake/OpenCVFindLibsGrfmt.cmake
|
|
|
|
+++ b/cmake/OpenCVFindLibsGrfmt.cmake
|
2021-04-11 23:01:59 +01:00
|
|
|
@@ -255,21 +255,12 @@ endif()
|
2020-04-23 18:23:32 +01:00
|
|
|
# --- OpenEXR (optional) ---
|
|
|
|
if(WITH_OPENEXR)
|
|
|
|
ocv_clear_vars(HAVE_OPENEXR)
|
|
|
|
- if(NOT BUILD_OPENEXR)
|
2021-04-11 23:01:59 +01:00
|
|
|
- ocv_clear_internal_cache_vars(OPENEXR_INCLUDE_PATHS OPENEXR_LIBRARIES OPENEXR_ILMIMF_LIBRARY OPENEXR_VERSION)
|
2020-04-23 18:23:32 +01:00
|
|
|
- include("${OpenCV_SOURCE_DIR}/cmake/OpenCVFindOpenEXR.cmake")
|
|
|
|
- endif()
|
|
|
|
+ pkg_check_modules(OPENEXR OpenEXR)
|
2021-04-11 23:01:59 +01:00
|
|
|
|
2020-04-23 18:23:32 +01:00
|
|
|
if(OPENEXR_FOUND)
|
|
|
|
set(HAVE_OPENEXR YES)
|
|
|
|
- else()
|
|
|
|
- ocv_clear_vars(OPENEXR_INCLUDE_PATHS OPENEXR_LIBRARIES OPENEXR_ILMIMF_LIBRARY OPENEXR_VERSION)
|
|
|
|
-
|
|
|
|
- set(OPENEXR_LIBRARIES IlmImf)
|
|
|
|
- add_subdirectory("${OpenCV_SOURCE_DIR}/3rdparty/openexr")
|
|
|
|
- if(OPENEXR_VERSION) # check via TARGET doesn't work
|
|
|
|
- set(HAVE_OPENEXR YES)
|
|
|
|
- endif()
|
|
|
|
+ set(OPENEXR_INCLUDE_PATHS ${OPENEXR_INCLUDE_DIRS})
|
|
|
|
+ set(OPENEXR_LIBRARIES ${OPENEXR_LIBRARIES})
|
|
|
|
endif()
|
|
|
|
endif()
|
|
|
|
|