superslicer-2.5.59.2-openexr3.patch 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. diff --git a/cmake/modules/FindOpenVDB.cmake b/cmake/modules/FindOpenVDB.cmake
  2. index 4fde5fa..566e73a 100644
  3. --- a/cmake/modules/FindOpenVDB.cmake
  4. +++ b/cmake/modules/FindOpenVDB.cmake
  5. @@ -347,28 +347,10 @@ macro(just_fail msg)
  6. return()
  7. endmacro()
  8. -find_package(IlmBase QUIET)
  9. -if(NOT IlmBase_FOUND)
  10. - pkg_check_modules(IlmBase QUIET IlmBase)
  11. -endif()
  12. -if (IlmBase_FOUND AND NOT TARGET IlmBase::Half)
  13. - message(STATUS "Falling back to IlmBase found by pkg-config...")
  14. -
  15. - find_library(IlmHalf_LIBRARY NAMES Half)
  16. - if(IlmHalf_LIBRARY-NOTFOUND OR NOT IlmBase_INCLUDE_DIRS)
  17. - just_fail("IlmBase::Half can not be found!")
  18. - endif()
  19. -
  20. - add_library(IlmBase::Half UNKNOWN IMPORTED)
  21. - set_target_properties(IlmBase::Half PROPERTIES
  22. - IMPORTED_LOCATION "${IlmHalf_LIBRARY}"
  23. - INTERFACE_INCLUDE_DIRECTORIES "${IlmBase_INCLUDE_DIRS}")
  24. -elseif(NOT IlmBase_FOUND)
  25. - just_fail("IlmBase::Half can not be found!")
  26. -endif()
  27. find_package(TBB ${_quiet} ${_required} COMPONENTS tbb)
  28. find_package(ZLIB ${_quiet} ${_required})
  29. find_package(Boost ${_quiet} ${_required} COMPONENTS iostreams system )
  30. +find_package(Imath CONFIG)
  31. # Use GetPrerequisites to see which libraries this OpenVDB lib has linked to
  32. # which we can query for optional deps. This basically runs ldd/otoll/objdump
  33. @@ -419,7 +401,7 @@ foreach(PREREQUISITE ${_OPENVDB_PREREQUISITE_LIST})
  34. set(OpenVDB_USES_LOG4CPLUS ON)
  35. endif()
  36. - string(FIND ${PREREQUISITE} "IlmImf" _HAS_DEP)
  37. + string(FIND ${PREREQUISITE} "OpenEXR" _HAS_DEP)
  38. if(NOT ${_HAS_DEP} EQUAL -1)
  39. set(OpenVDB_USES_ILM ON)
  40. endif()
  41. @@ -450,11 +432,7 @@ if(OpenVDB_USES_LOG4CPLUS)
  42. find_package(Log4cplus ${_quiet} ${_required})
  43. endif()
  44. -if(OpenVDB_USES_ILM)
  45. - find_package(IlmBase ${_quiet} ${_required})
  46. -endif()
  47. -
  48. -if(OpenVDB_USES_EXR)
  49. +if(OpenVDB_USES_ILM OR OpenVDB_USES_EXR)
  50. find_package(OpenEXR ${_quiet} ${_required})
  51. endif()
  52. @@ -471,7 +449,7 @@ endif()
  53. set(_OPENVDB_VISIBLE_DEPENDENCIES
  54. Boost::iostreams
  55. Boost::system
  56. - IlmBase::Half
  57. + Imath::Imath
  58. )
  59. set(_OPENVDB_DEFINITIONS)
  60. @@ -481,10 +459,7 @@ endif()
  61. if(OpenVDB_USES_EXR)
  62. list(APPEND _OPENVDB_VISIBLE_DEPENDENCIES
  63. - IlmBase::IlmThread
  64. - IlmBase::Iex
  65. - IlmBase::Imath
  66. - OpenEXR::IlmImf
  67. + OpenEXR::OpenEXR
  68. )
  69. list(APPEND _OPENVDB_DEFINITIONS "-DOPENVDB_TOOLS_RAYTRACER_USE_EXR")
  70. endif()