libvigra/libvigra-1.11.1-openexr-3.0.1.patch

22 lines
717 B
Diff

diff --git a/config/FindOpenEXR.cmake b/config/FindOpenEXR.cmake
index ef36cdbf..0423e247 100644
--- a/config/FindOpenEXR.cmake
+++ b/config/FindOpenEXR.cmake
@@ -23,6 +23,16 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+find_package(OpenEXR 3.0 CONFIG QUIET)
+if(TARGET OpenEXR::OpenEXR)
+ find_package(Threads)
+ SET(OPENEXR_FOUND TRUE)
+ SET(OPENEXR_INCLUDE_DIR OpenEXR::OpenEXR)
+ SET(OPENEXR_LIBRARIES OpenEXR::OpenEXR)
+ SET(OPENEXR_VERSION ${OpenEXR_VERSION})
+ return()
+endif()
+
FIND_PATH(OPENEXR_INCLUDE_DIR ImfRgbaFile.h PATH_SUFFIXES OpenEXR)
FOREACH(V "" -2_2 -2_1 -2_0 -1_7)