Группа :: Система/Библиотеки
Пакет: OpenSceneGraph
Главная Изменения Спек Патчи Sources Загрузить Gear Bugs and FR Repocop
Патч: OpenSceneGraph-openexr3.patch
Скачать
Скачать
diff -rupN --no-dereference OpenSceneGraph-OpenSceneGraph-3.6.5/CMakeLists.txt OpenSceneGraph-OpenSceneGraph-3.6.5-new/CMakeLists.txt
--- OpenSceneGraph-OpenSceneGraph-3.6.5/CMakeLists.txt 2021-11-13 21:34:02.520773203 +0100
+++ OpenSceneGraph-OpenSceneGraph-3.6.5-new/CMakeLists.txt 2021-11-13 21:34:03.101774222 +0100
@@ -742,7 +742,19 @@ ELSE()
FIND_PACKAGE(ilmbase)
FIND_PACKAGE(Inventor)
FIND_PACKAGE(Jasper)
- FIND_PACKAGE(OpenEXR)
+ FIND_PACKAGE(Imath CONFIG)
+ IF(TARGET Imath::Imath)
+ FIND_PACKAGE(OpenEXR REQUIRED CONFIG)
+ SET(OPENEXR_LIBRARIES OpenEXR::OpenEXR Imath::Imath)
+ SET(OPENEXR_LIBRARIES_VARS "${OPENEXR_LIBRARIES}")
+ GET_TARGET_PROPERTY(OPENEXR_INCLUDE_DIR OpenEXR::OpenEXRConfig INTERFACE_INCLUDE_DIRECTORIES)
+ GET_TARGET_PROPERTY(IMATH_INCLUDE_DIR Imath::ImathConfig INTERFACE_INCLUDE_DIRECTORIES)
+ LIST(APPEND OPENEXR_INCLUDE_DIR ${IMATH_INCLUDE_DIR})
+ MESSAGE(STATUS "OpenEXR/Imath libraries: " ${OPENEXR_LIBRARIES})
+ SET(OPENEXR_FOUND TRUE)
+ ELSE()
+ FIND_PACKAGE(OpenEXR)
+ ENDIF()
FIND_PACKAGE(OpenCascade)
FIND_PACKAGE(COLLADA)
FIND_PACKAGE(FBX)
diff -rupN --no-dereference OpenSceneGraph-OpenSceneGraph-3.6.5/CMakeModules/FindOpenEXR.cmake OpenSceneGraph-OpenSceneGraph-3.6.5-new/CMakeModules/FindOpenEXR.cmake
--- OpenSceneGraph-OpenSceneGraph-3.6.5/CMakeModules/FindOpenEXR.cmake 2020-01-31 12:03:07.000000000 +0100
+++ OpenSceneGraph-OpenSceneGraph-3.6.5-new/CMakeModules/FindOpenEXR.cmake 2021-11-13 21:34:03.101774222 +0100
@@ -23,6 +23,7 @@ FIND_PATH(OPENEXR_INCLUDE_DIR OpenEXR/Im
/opt/include
/usr/freeware/include
)
+SET(OPENEXR_INCLUDE_DIR ${OPENEXR_INCLUDED_DIR}/OpenEXR)
# Macro to find exr libraries (deduplicating search paths)
# example: OPENEXR_FIND_VAR(OPENEXR_IlmImf_LIBRARY IlmImf)
diff -rupN --no-dereference OpenSceneGraph-OpenSceneGraph-3.6.5/src/osgPlugins/exr/CMakeLists.txt OpenSceneGraph-OpenSceneGraph-3.6.5-new/src/osgPlugins/exr/CMakeLists.txt
--- OpenSceneGraph-OpenSceneGraph-3.6.5/src/osgPlugins/exr/CMakeLists.txt 2020-01-31 12:03:07.000000000 +0100
+++ OpenSceneGraph-OpenSceneGraph-3.6.5-new/src/osgPlugins/exr/CMakeLists.txt 2021-11-13 21:34:03.102774224 +0100
@@ -12,3 +12,8 @@ ENDIF()
#### end var setup ###
SETUP_PLUGIN(exr)
+
+# Force linking with OpenEXR/Imath until upstream fixes their config.
+if(TARGET Imath::Imath)
+ target_link_libraries(osgdb_exr OpenEXR::OpenEXR Imath::Imath)
+endif()
diff -rupN --no-dereference OpenSceneGraph-OpenSceneGraph-3.6.5/src/osgPlugins/exr/ReaderWriterEXR.cpp OpenSceneGraph-OpenSceneGraph-3.6.5-new/src/osgPlugins/exr/ReaderWriterEXR.cpp
--- OpenSceneGraph-OpenSceneGraph-3.6.5/src/osgPlugins/exr/ReaderWriterEXR.cpp 2020-01-31 12:03:07.000000000 +0100
+++ OpenSceneGraph-OpenSceneGraph-3.6.5-new/src/osgPlugins/exr/ReaderWriterEXR.cpp 2021-11-13 21:34:03.102774224 +0100
@@ -41,11 +41,11 @@ public:
{
return _inStream->read(c,n).good();
};
- virtual Int64 tellg ()
+ virtual uint64_t tellg ()
{
return _inStream->tellg();
};
- virtual void seekg (Int64 pos)
+ virtual void seekg (uint64_t pos)
{
_inStream->seekg(pos);
};
@@ -69,11 +69,11 @@ public:
{
_outStream->write(c,n);
};
- virtual Int64 tellp ()
+ virtual uint64_t tellp ()
{
return _outStream->tellp();
};
- virtual void seekp (Int64 pos)
+ virtual void seekp (uint64_t pos)
{
_outStream->seekp(pos);
};