diff options
author | Matthias Andree <mandree@FreeBSD.org> | 2021-04-11 20:02:53 +0000 |
---|---|---|
committer | Matthias Andree <mandree@FreeBSD.org> | 2021-04-12 00:33:48 +0000 |
commit | 15e60bd31ebaf401bf1e71bd90ea6232fb3b6d72 (patch) | |
tree | 29a4e0c837b8ff457c935afbb5d2c2dd3cb2b8fa | |
parent | 8bd75ffd808902bb002b3d1c46a89478cfa57d8b (diff) |
cad/PrusaSlicer: make compatible with OpenEXR/Imath 3.0
-rw-r--r-- | cad/PrusaSlicer/Makefile | 2 | ||||
-rw-r--r-- | cad/PrusaSlicer/files/patch-cmake_modules_FindOpenVDB.cmake | 83 |
2 files changed, 84 insertions, 1 deletions
diff --git a/cad/PrusaSlicer/Makefile b/cad/PrusaSlicer/Makefile index 904e1d403caa..b3daaed3fed6 100644 --- a/cad/PrusaSlicer/Makefile +++ b/cad/PrusaSlicer/Makefile @@ -25,7 +25,7 @@ BUILD_DEPENDS= cereal>=1.3.0.10:devel/cereal \ cgal>=5.0.2:math/cgal USES= cmake desktop-file-utils eigen:3 gettext gl iconv pkgconfig -CMAKE_ARGS= -DwxWidgets_CONFIG_EXECUTABLE="${WX_CONFIG}" \ +CMAKE_ARGS+= -DwxWidgets_CONFIG_EXECUTABLE="${WX_CONFIG}" \ -DSLIC3R_GTK=3 \ -DSLIC3R_FHS=1 USE_GITHUB= yes diff --git a/cad/PrusaSlicer/files/patch-cmake_modules_FindOpenVDB.cmake b/cad/PrusaSlicer/files/patch-cmake_modules_FindOpenVDB.cmake new file mode 100644 index 000000000000..34a84f656874 --- /dev/null +++ b/cad/PrusaSlicer/files/patch-cmake_modules_FindOpenVDB.cmake @@ -0,0 +1,83 @@ +--- cmake/modules/FindOpenVDB.cmake.orig 2021-01-11 13:01:51 UTC ++++ cmake/modules/FindOpenVDB.cmake +@@ -326,24 +326,24 @@ macro(just_fail msg) + return() + endmacro() + +-find_package(IlmBase QUIET COMPONENTS Half) +-if(NOT IlmBase_FOUND) +- pkg_check_modules(IlmBase QUIET IlmBase) ++find_package(Imath QUIET COMPONENTS Half) ++if(NOT Imath_FOUND) ++ pkg_check_modules(Imath QUIET Imath) + endif() +-if (IlmBase_FOUND AND NOT TARGET IlmBase::Half) +- message(STATUS "Falling back to IlmBase found by pkg-config...") ++if (Imath_FOUND AND NOT TARGET Imath::Half) ++ message(STATUS "Falling back to Imath found by pkg-config...") + +- find_library(IlmHalf_LIBRARY NAMES Half) +- if(IlmHalf_LIBRARY-NOTFOUND OR NOT IlmBase_INCLUDE_DIRS) +- just_fail("IlmBase::Half can not be found!") ++ find_library(Imath_LIBRARY NAMES Imath) ++ if(Imath_LIBRARY-NOTFOUND OR NOT Imath_INCLUDE_DIRS) ++ just_fail("Imath::Half can not be found!") + endif() + +- add_library(IlmBase::Half UNKNOWN IMPORTED) +- set_target_properties(IlmBase::Half PROPERTIES +- IMPORTED_LOCATION "${IlmHalf_LIBRARY}" +- INTERFACE_INCLUDE_DIRECTORIES "${IlmBase_INCLUDE_DIRS}") +-elseif(NOT IlmBase_FOUND) +- just_fail("IlmBase::Half can not be found!") ++ add_library(Imath::Half UNKNOWN IMPORTED) ++ set_target_properties(Imath::Half PROPERTIES ++ IMPORTED_LOCATION "${Imath_LIBRARY}" ++ INTERFACE_INCLUDE_DIRECTORIES "${Imath_INCLUDE_DIRS}") ++elseif(NOT Imath_FOUND) ++ just_fail("Imath::Half can not be found!") + endif() + find_package(TBB ${_quiet} ${_required} COMPONENTS tbb) + find_package(ZLIB ${_quiet} ${_required}) +@@ -430,7 +430,7 @@ if(OpenVDB_USES_LOG4CPLUS) + endif() + + if(OpenVDB_USES_ILM) +- find_package(IlmBase ${_quiet} ${_required}) ++ find_package(Imath ${_quiet} ${_required}) + endif() + + if(OpenVDB_USES_EXR) +@@ -442,7 +442,7 @@ if(UNIX) + endif() + + # Set deps. Note that the order here is important. If we're building against +-# Houdini 17.5 we must include OpenEXR and IlmBase deps first to ensure the ++# Houdini 17.5 we must include OpenEXR and Imath deps first to ensure the + # users chosen namespaced headers are correctly prioritized. Otherwise other + # include paths from shared installs (including houdini) may pull in the wrong + # headers +@@ -450,7 +450,7 @@ endif() + set(_OPENVDB_VISIBLE_DEPENDENCIES + Boost::iostreams + Boost::system +- IlmBase::Half ++ Imath::Half + ) + + set(_OPENVDB_DEFINITIONS) +@@ -460,10 +460,10 @@ endif() + + if(OpenVDB_USES_EXR) + list(APPEND _OPENVDB_VISIBLE_DEPENDENCIES +- IlmBase::IlmThread +- IlmBase::Iex +- IlmBase::Imath +- OpenEXR::IlmImf ++ OpenEXR::IlmThread ++ OpenEXR::Iex ++ Imath::Imath ++ OpenEXR::OpenEXR + ) + list(APPEND _OPENVDB_DEFINITIONS "-DOPENVDB_TOOLS_RAYTRACER_USE_EXR") + endif() |