Sophie

Sophie

distrib > Mageia > cauldron > i586 > media > core-release-src > by-pkgid > bd45c2b7b29807361e32d2e0934b53d4 > files > 10

aqsis-1.8.2-43.mga10.src.rpm

diff --git a/CMakeLists.txt b/CMakeLists.txt
index a83577f..217b94c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -117,7 +117,20 @@ endif()
 
 # OpenEXR
 if(AQSIS_USE_OPENEXR)
-	find_package(OpenEXR)
+	find_package(OpenEXR QUIET CONFIG)
+
+	if(TARGET OpenEXR::OpenEXR)
+		list(APPEND AQSIS_OPENEXR_LIBRARIES OpenEXR::OpenEXR)
+		get_target_property(OPENEXR_INCLUDE_DIRS
+			OpenEXR::OpenEXRConfig INTERFACE_INCLUDE_DIRECTORIES)
+		find_package(Imath QUIET CONFIG)
+		get_target_property(IMATH_INCLUDE_DIRS
+			Imath::ImathConfig INTERFACE_INCLUDE_DIRECTORIES)
+		list(APPEND OPENEXR_INCLUDE_DIR ${OPENEXR_INCLUDE_DIRS} ${IMATH_INCLUDE_DIRS})
+		set(AQSIS_OPENEXR_FOUND 1)
+	else()
+		find_package(OpenEXR REQUIRED)
+	endif()
 
 	if(NOT AQSIS_OPENEXR_FOUND)
 		message("** Cannot find OpenEXR - aqsis will be built without support for the OpenEXR image format")
diff --git a/cmake/modules/FindZLIB.cmake b/cmake/modules/FindZLIB.cmake
index 085047e..e1cfc65 100644
--- a/cmake/modules/FindZLIB.cmake
+++ b/cmake/modules/FindZLIB.cmake
@@ -47,5 +47,11 @@ STRING(COMPARE EQUAL "${AQSIS_ZLIB_LIBRARIES}" "AQSIS_ZLIB_LIBRARIES-NOTFOUND" A
 
 IF(NOT AQSIS_ZLIB_LIBRARIES_NOTFOUND AND NOT AQSIS_ZLIB_INCLUDE_NOTFOUND)
 	SET(AQSIS_ZLIB_FOUND 1)
+	SET(ZLIB_FOUND 1)
+	if(NOT TARGET ZLIB::ZLIB)
+		add_library(ZLIB::ZLIB UNKNOWN IMPORTED)
+		set_target_properties(ZLIB::ZLIB PROPERTIES
+			IMPORTED_LOCATION ${AQSIS_ZLIB_LIBRARIES})
+	endif()
 ENDIF(NOT AQSIS_ZLIB_LIBRARIES_NOTFOUND AND NOT AQSIS_ZLIB_INCLUDE_NOTFOUND)
 
diff --git a/include/aqsis/tex/buffers/channelinfo.h b/include/aqsis/tex/buffers/channelinfo.h
index 140f6e7..6403009 100644
--- a/include/aqsis/tex/buffers/channelinfo.h
+++ b/include/aqsis/tex/buffers/channelinfo.h
@@ -44,7 +44,7 @@
 #include <string>
 
 #ifdef USE_OPENEXR
-#include <OpenEXR/half.h>
+#include <Imath/half.h>
 #endif
 
 #include <aqsis/util/enum.h>
diff --git a/libs/pointrender/microbuffer.cpp b/libs/pointrender/microbuffer.cpp
index d9d6345..cec72a7 100644
--- a/libs/pointrender/microbuffer.cpp
+++ b/libs/pointrender/microbuffer.cpp
@@ -29,7 +29,7 @@
 
 #include "microbuffer.h"
 
-#include <OpenEXR/ImathFun.h>
+#include <Imath/ImathFun.h>
 
 #include <boost/math/special_functions/sign.hpp>
 
diff --git a/libs/pointrender/microbuffer.h b/libs/pointrender/microbuffer.h
index 0bbb750..87efb6e 100644
--- a/libs/pointrender/microbuffer.h
+++ b/libs/pointrender/microbuffer.h
@@ -39,8 +39,8 @@
 
 #include <boost/scoped_array.hpp>
 
-#include <OpenEXR/ImathVec.h>
-#include <OpenEXR/ImathMath.h>
+#include <Imath/ImathVec.h>
+#include <Imath/ImathMath.h>
 
 
 namespace Aqsis {
diff --git a/libs/pointrender/pointcontainer.h b/libs/pointrender/pointcontainer.h
index 9d09206..1171862 100644
--- a/libs/pointrender/pointcontainer.h
+++ b/libs/pointrender/pointcontainer.h
@@ -34,9 +34,9 @@
 #include <map>
 #include <vector>
 
-#include <OpenEXR/ImathVec.h>
-#include <OpenEXR/ImathBox.h>
-#include <OpenEXR/ImathColor.h>
+#include <Imath/ImathVec.h>
+#include <Imath/ImathBox.h>
+#include <Imath/ImathColor.h>
 
 #include <boost/scoped_array.hpp>
 #include <boost/shared_ptr.hpp>
diff --git a/libs/shadervm/shaderexecenv/shadeops_bake3d.cpp b/libs/shadervm/shaderexecenv/shadeops_bake3d.cpp
index 30023c8..080e204 100644
--- a/libs/shadervm/shaderexecenv/shadeops_bake3d.cpp
+++ b/libs/shadervm/shaderexecenv/shadeops_bake3d.cpp
@@ -31,7 +31,8 @@
 #include <aqsis/util/autobuffer.h>
 #include <aqsis/util/logging.h>
 
-#include <OpenEXR/ImathVec.h>
+#include <Imath/ImathVec.h>
+#include <cfloat>
 
 namespace Aqsis
 {
diff --git a/libs/tex/buffers/mixedimagebuffer.cpp b/libs/tex/buffers/mixedimagebuffer.cpp
index 8717cd5..2d3fe84 100644
--- a/libs/tex/buffers/mixedimagebuffer.cpp
+++ b/libs/tex/buffers/mixedimagebuffer.cpp
@@ -40,7 +40,7 @@
 #include <aqsis/tex/buffers/mixedimagebuffer.h>
 
 #ifdef USE_OPENEXR
-#include <OpenEXR/half.h>
+#include <Imath/half.h>
 #endif
 
 #include <aqsis/util/exception.h>
diff --git a/libs/tex/filtering/itexturesampler.cpp b/libs/tex/filtering/itexturesampler.cpp
index 0a243ab..5e86887 100644
--- a/libs/tex/filtering/itexturesampler.cpp
+++ b/libs/tex/filtering/itexturesampler.cpp
@@ -38,7 +38,7 @@
 #include <aqsis/tex/filtering/itexturesampler.h>
 
 #ifdef USE_OPENEXR
-#	include <OpenEXR/half.h>
+#	include <Imath/half.h>
 #endif
 
 #include "dummytexturesampler.h"
diff --git a/libs/tex/io/exrinputfile.h b/libs/tex/io/exrinputfile.h
index ba7746f..5d6b27f 100644
--- a/libs/tex/io/exrinputfile.h
+++ b/libs/tex/io/exrinputfile.h
@@ -49,6 +49,7 @@
 #include <aqsis/tex/io/itexinputfile.h>
 
 #include <OpenEXR/ImfInputFile.h>
+#include <OpenEXR/ImfHeader.h>
 
 //------------------------------------------------------------------------------
 
diff --git a/prototypes/newcore/CMakeLists.txt b/prototypes/newcore/CMakeLists.txt
index 492a032..641be3c 100644
--- a/prototypes/newcore/CMakeLists.txt
+++ b/prototypes/newcore/CMakeLists.txt
@@ -25,7 +25,7 @@ if(first_cmake_run AND CMAKE_BUILD_TYPE STREQUAL "")
     )
 endif()
 
-find_path(ILMBASE_INCLUDE_DIR OpenEXR/ImathBox.h)
+find_path(ILMBASE_INCLUDE_DIR Imath/ImathBox.h)
 find_library(ILMBASE_IEX_LIBRARY Iex)
 
 find_package(Qt4)
diff --git a/prototypes/newcore/experiments/edge_eqn_test2.cpp b/prototypes/newcore/experiments/edge_eqn_test2.cpp
index ba1995b..e0a47bb 100644
--- a/prototypes/newcore/experiments/edge_eqn_test2.cpp
+++ b/prototypes/newcore/experiments/edge_eqn_test2.cpp
@@ -32,7 +32,7 @@
 #include <cstdio>
 #include <cstdlib>
 
-#include <OpenEXR/ImathVec.h>
+#include <Imath/ImathVec.h>
 
 typedef Imath::V2f Vec2;
 
diff --git a/prototypes/newcore/experiments/float4_test.cpp b/prototypes/newcore/experiments/float4_test.cpp
index 4364a5a..7c9b532 100644
--- a/prototypes/newcore/experiments/float4_test.cpp
+++ b/prototypes/newcore/experiments/float4_test.cpp
@@ -29,7 +29,7 @@
 // (This is the New BSD license)
 
 #include "float4.h"
-#include "OpenEXR/ImathMatrix.h"
+#include "Imath/ImathMatrix.h"
 
 __attribute__((noinline)) void vadd(float* c, int n, const float* a, const float* b)
 {
diff --git a/prototypes/newcore/experiments/fractal_threading.cpp b/prototypes/newcore/experiments/fractal_threading.cpp
index 76e605a..799c810 100644
--- a/prototypes/newcore/experiments/fractal_threading.cpp
+++ b/prototypes/newcore/experiments/fractal_threading.cpp
@@ -41,7 +41,7 @@
 #include <boost/thread.hpp>
 #include <boost/unordered_map.hpp>
 
-#include <OpenEXR/ImathVec.h>
+#include <Imath/ImathVec.h>
 
 #include "../refcount.h"
 //#include "omp.h"
diff --git a/prototypes/newcore/util.h b/prototypes/newcore/util.h
index 2046c59..e56c403 100644
--- a/prototypes/newcore/util.h
+++ b/prototypes/newcore/util.h
@@ -46,10 +46,10 @@
 // Ideally, we should modify the win32libs structure to 
 // properly match OpenEXR and drop this.
 #ifndef WIN32
-#include <OpenEXR/ImathBox.h>
-#include <OpenEXR/ImathMatrix.h>
-#include <OpenEXR/ImathVec.h>
-#include <OpenEXR/ImathColor.h>
+#include <Imath/ImathBox.h>
+#include <Imath/ImathMatrix.h>
+#include <Imath/ImathVec.h>
+#include <Imath/ImathColor.h>
 #else
 #include <ImathBox.h>
 #include <ImathMatrix.h>
diff --git a/tools/displays/exr/d_exr.cpp b/tools/displays/exr/d_exr.cpp
index cad9f50..e1bce6f 100644
--- a/tools/displays/exr/d_exr.cpp
+++ b/tools/displays/exr/d_exr.cpp
@@ -117,10 +117,10 @@
 #include <OpenEXR/ImfCompressionAttribute.h>
 #include <OpenEXR/ImfLut.h>
 #include <OpenEXR/ImfArray.h>
-#include <OpenEXR/ImathFun.h>
+#include <Imath/ImathFun.h>
 #include <OpenEXR/Iex.h>
-#include <OpenEXR/half.h>
-#include <OpenEXR/halfFunction.h>
+#include <Imath/half.h>
+#include <Imath/halfFunction.h>
 #if AQSIS_SYSTEM_WIN32 && (defined(AQSIS_COMPILER_MSVC6) || defined(AQSIS_COMPILER_MSVC7))
 #	pragma warning(pop)
 #endif
diff --git a/tools/ptview/ptview.cpp b/tools/ptview/ptview.cpp
index c5616c4..bd47bd5 100644
--- a/tools/ptview/ptview.cpp
+++ b/tools/ptview/ptview.cpp
@@ -43,8 +43,8 @@
 #endif
 
 #define NOMINMAX
-#include <OpenEXR/ImathVec.h>
-#include <OpenEXR/ImathMatrix.h>
+#include <Imath/ImathVec.h>
+#include <Imath/ImathMatrix.h>
 
 #include "ptview.h"
 #include "microbuffer.h"
@@ -54,7 +54,7 @@
 namespace Aqsis {
 
 //----------------------------------------------------------------------
-//#include <OpenEXR/ImathGL.h>
+//#include <Imath/ImathGL.h>
 // Utilities for OpenEXR / OpenGL interoperability.
 //
 // Technically we could use the stuff from ImathGL instead here, but it has
diff --git a/tools/ptview/ptview.h b/tools/ptview/ptview.h
index caf3fe7..343b294 100644
--- a/tools/ptview/ptview.h
+++ b/tools/ptview/ptview.h
@@ -41,8 +41,8 @@
 #include <QtGui/QMainWindow>
 #include <QtOpenGL/QGLWidget>
 
-#include <OpenEXR/ImathVec.h>
-#include <OpenEXR/ImathColor.h>
+#include <Imath/ImathVec.h>
+#include <Imath/ImathColor.h>
 
 #include <Partio.h>