diff --git a/cmake/modules/FindTBB.cmake b/cmake/modules/FindTBB.cmake index 6aa89e312..f91c50895 100644 --- a/cmake/modules/FindTBB.cmake +++ b/cmake/modules/FindTBB.cmake @@ -8,22 +8,16 @@ if(${CMAKE_FIND_PACKAGE_NAME}_FIND_QUIETLY) set(_q QUIET) endif() -# Only consider the config scripts if not building with the static dependencies -# and this call is not made from a static dependency build (e.g. dep_OpenVDB will use this module) -# BUILD_SHARED_LIBS will always be defined for dependency projects and will be OFF. -# Newer versions of TBB also discourage from using TBB as a static library -if (NOT SLIC3R_STATIC AND (NOT DEFINED BUILD_SHARED_LIBS OR BUILD_SHARED_LIBS)) - find_package(${CMAKE_FIND_PACKAGE_NAME} ${${CMAKE_FIND_PACKAGE_NAME}_FIND_VERSION} CONFIG ${_q}) - if(NOT ${CMAKE_FIND_PACKAGE_NAME}_FIND_QUIETLY) - if (NOT ${CMAKE_FIND_PACKAGE_NAME}_FOUND) - message(STATUS "Falling back to MODULE search for ${CMAKE_FIND_PACKAGE_NAME}...") - else() - message(STATUS "${CMAKE_FIND_PACKAGE_NAME} found in ${${CMAKE_FIND_PACKAGE_NAME}_DIR}") - endif() +find_package(${CMAKE_FIND_PACKAGE_NAME} ${${CMAKE_FIND_PACKAGE_NAME}_FIND_VERSION} CONFIG ${_q}) + +if(NOT ${CMAKE_FIND_PACKAGE_NAME}_FIND_QUIETLY) + if (NOT ${CMAKE_FIND_PACKAGE_NAME}_FOUND) + message(STATUS "Falling back to MODULE search for ${CMAKE_FIND_PACKAGE_NAME}...") + else() + message(STATUS "${CMAKE_FIND_PACKAGE_NAME} found in ${${CMAKE_FIND_PACKAGE_NAME}_DIR}") endif() - -endif () +endif() if (NOT ${CMAKE_FIND_PACKAGE_NAME}_FOUND) include(${CMAKE_CURRENT_LIST_DIR}/FindTBB.cmake.in) diff --git a/deps/OpenVDB/OpenVDB.cmake b/deps/OpenVDB/OpenVDB.cmake index 10dc2d916..eb2350cda 100644 --- a/deps/OpenVDB/OpenVDB.cmake +++ b/deps/OpenVDB/OpenVDB.cmake @@ -7,8 +7,9 @@ else() endif() prusaslicer_add_cmake_project(OpenVDB - URL https://github.com/tamasmeszaros/openvdb/archive/refs/tags/v6.2.1-prusa3d.zip #v6.2.1 patched - URL_HASH SHA256=caf9f0c91976722883ff9cb32420ef142af22f7e625fc643b91c23d6e4172f62 + # 8.2 patched + URL https://github.com/tamasmeszaros/openvdb/archive/d49d53332d054e71dfa444a8cb5f965212a57a92.zip + URL_HASH SHA256=2a5a50f3565a53ab7e7b78d6e2b345faa1f3b49891d004a3f052cb8cf01a5dfa DEPENDS dep_TBB dep_Blosc dep_OpenEXR dep_Boost CMAKE_ARGS -DCMAKE_POSITION_INDEPENDENT_CODE=ON diff --git a/deps/TBB/TBB.cmake b/deps/TBB/TBB.cmake index 7315716e0..40d249c1b 100644 --- a/deps/TBB/TBB.cmake +++ b/deps/TBB/TBB.cmake @@ -1,7 +1,7 @@ prusaslicer_add_cmake_project( TBB - URL "https://github.com/wjakob/tbb/archive/a0dc9bf76d0120f917b641ed095360448cabc85b.tar.gz" - URL_HASH SHA256=0545cb6033bd1873fcae3ea304def720a380a88292726943ae3b9b207f322efe + URL "https://github.com/oneapi-src/oneTBB/archive/refs/tags/v2021.5.0.zip" + URL_HASH SHA256=83ea786c964a384dd72534f9854b419716f412f9d43c0be88d41874763e7bb47 CMAKE_ARGS -DTBB_BUILD_SHARED=OFF -DTBB_BUILD_TESTS=OFF