Changeset View
Changeset View
Standalone View
Standalone View
files/Support-building-with-OpenEXR-3.patch
- This file was added.
| From 4aa7fc0cbf5259f388d777f2a4d0bf2252c2158f Mon Sep 17 00:00:00 2001 | |||||
| From: Antonio Rojas <arojas@archlinux.org> | |||||
| Date: Sat, 24 Apr 2021 12:07:48 +0200 | |||||
| Subject: [PATCH 1/2] Support OpenEXR 3.0 | |||||
| Try to find OpenEXR 3.0 using the upstream cmake config, and fallback to the previous algorithm if not found | |||||
| --- | |||||
| cmake/OpenCVFindOpenEXR.cmake | 8 ++++++++ | |||||
| 1 file changed, 8 insertions(+) | |||||
| diff --git a/cmake/OpenCVFindOpenEXR.cmake b/cmake/OpenCVFindOpenEXR.cmake | |||||
| index ef633e853adc..133468243a84 100644 | |||||
| --- a/cmake/OpenCVFindOpenEXR.cmake | |||||
| +++ b/cmake/OpenCVFindOpenEXR.cmake | |||||
| @@ -9,6 +9,14 @@ | |||||
| # OPENEXR_LIBRARIES = libraries that are needed to use OpenEXR. | |||||
| # | |||||
| +find_package(OpenEXR 3.0 CONFIG QUIET) | |||||
| +if(TARGET OpenEXR::OpenEXR) | |||||
| + SET(OPENEXR_FOUND TRUE) | |||||
| + SET(OPENEXR_LIBRARIES OpenEXR::OpenEXR) | |||||
| + SET(OPENEXR_VERSION ${OpenEXR_VERSION}) | |||||
| + return() | |||||
| +endif() | |||||
| + | |||||
| SET(OPENEXR_LIBRARIES "") | |||||
| SET(OPENEXR_LIBSEARCH_SUFFIXES "") | |||||
| file(TO_CMAKE_PATH "$ENV{ProgramFiles}" ProgramFiles_ENV_PATH) | |||||
| From 032339ab950fd05c5577765b86498e97623a09db Mon Sep 17 00:00:00 2001 | |||||
| From: Antonio Rojas <arojas@archlinux.org> | |||||
| Date: Sat, 24 Apr 2021 12:09:51 +0200 | |||||
| Subject: [PATCH 2/2] Add explicit ImfFrameBuffer.h include | |||||
| This was transitively included with OpenEXR 2.x, but that's no longer the case with OpenEXR 3.x | |||||
| --- | |||||
| modules/imgcodecs/src/grfmt_exr.cpp | 1 + | |||||
| 1 file changed, 1 insertion(+) | |||||
| diff --git a/modules/imgcodecs/src/grfmt_exr.cpp b/modules/imgcodecs/src/grfmt_exr.cpp | |||||
| index 9242871f8dde..aaf28eead6f7 100644 | |||||
| --- a/modules/imgcodecs/src/grfmt_exr.cpp | |||||
| +++ b/modules/imgcodecs/src/grfmt_exr.cpp | |||||
| @@ -56,6 +56,7 @@ | |||||
| #include <iostream> | |||||
| #include <stdexcept> | |||||
| +#include <ImfFrameBuffer.h> | |||||
| #include <ImfHeader.h> | |||||
| #include <ImfInputFile.h> | |||||
| #include <ImfOutputFile.h> | |||||
Copyright © 2015-2021 Solus Project. The Solus logo is Copyright © 2016-2021 Solus Project. All Rights Reserved.