Blob Blame History Raw
Index: libYafaRay-3.5.1/CMakeLists.txt
===================================================================
--- libYafaRay-3.5.1.orig/CMakeLists.txt
+++ libYafaRay-3.5.1/CMakeLists.txt
@@ -137,8 +137,19 @@ else(WITH_Freetype)
 endif(WITH_Freetype)
 
 if(WITH_OpenEXR)
-	find_package(OpenEXR REQUIRED)
-	message("Using OpenEXR: yes")
+    find_package(OpenEXR QUIET CONFIG)
+    if(TARGET OpenEXR::OpenEXR)
+		find_package(Imath QUIET CONFIG)
+	    get_target_property(OPENEXR_INCLUDE_DIRS
+		    OpenEXR::OpenEXRConfig INTERFACE_INCLUDE_DIRECTORIES)
+	    get_target_property(IMATH_INCLUDE_DIRS
+			Imath::ImathConfig INTERFACE_INCLUDE_DIRECTORIES)
+		list(APPEND OPENEXR_INCLUDE_DIRS ${IMATH_INCLUDE_DIRS})
+	else()
+        find_package(OpenEXR REQUIRED)
+    endif()
+	message("OpenEXR include directory: ${OPENEXR_INCLUDE_DIRS}")
+    message("Using OpenEXR: yes")
 else(WITH_OpenEXR)
 	message("Using OpenEXR: no")
 endif(WITH_OpenEXR)
Index: libYafaRay-3.5.1/src/image_handlers/exrHandler.cc
===================================================================
--- libYafaRay-3.5.1.orig/src/image_handlers/exrHandler.cc
+++ libYafaRay-3.5.1/src/image_handlers/exrHandler.cc
@@ -50,8 +50,8 @@ public:
 	C_IStream (FILE *file, const char fileName[]):
 	Imf::IStream (fileName), _file (file) {}
 	virtual bool read (char c[], int n);
-	virtual Int64 tellg ();
-	virtual void seekg (Int64 pos);
+	virtual uint64_t tellg ();
+	virtual void seekg (uint64_t pos);
 	virtual void clear ();
 private:
 	FILE * _file;
@@ -70,12 +70,12 @@ bool C_IStream::read (char c[], int n)
 	return feof (_file);
 }
 
-Int64 C_IStream::tellg ()
+uint64_t C_IStream::tellg ()
 {
 	return ftell (_file);
 }
 
-void C_IStream::seekg (Int64 pos)
+void C_IStream::seekg (uint64_t pos)
 {
 	clearerr (_file);
 	fseek (_file, pos, SEEK_SET);
@@ -93,8 +93,8 @@ public:
 	C_OStream (FILE *file, const char fileName[]):
 	Imf::OStream (fileName), _file (file) {}
 	virtual void write (const char c[], int n);
-	virtual Int64 tellp ();
-	virtual void seekp (Int64 pos);
+	virtual uint64_t tellp ();
+	virtual void seekp (uint64_t pos);
 private:
 	FILE * _file;
 };
@@ -111,12 +111,12 @@ void C_OStream::write (const char c[], i
 	}
 }
 
-Int64 C_OStream::tellp ()
+uint64_t C_OStream::tellp ()
 {
 	return ftell (_file);
 }
 
-void C_OStream::seekp (Int64 pos)
+void C_OStream::seekp (uint64_t pos)
 {
 	clearerr (_file);
 	fseek (_file, pos, SEEK_SET);