diff --git a/CMakeLists.txt b/CMakeLists.txt index f2e8c2a..4fd3f40 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -360,7 +360,6 @@ if(OPENVDB_INSTALL_CMAKE_MODULES) cmake/FindLog4cplus.cmake cmake/FindOpenEXR.cmake cmake/FindOpenVDB.cmake - cmake/FindTBB.cmake cmake/OpenVDBGLFW3Setup.cmake cmake/OpenVDBHoudiniSetup.cmake cmake/OpenVDBMayaSetup.cmake diff --git a/cmake/FindOpenVDB.cmake b/cmake/FindOpenVDB.cmake index b065192..286e8b6 100644 --- a/cmake/FindOpenVDB.cmake +++ b/cmake/FindOpenVDB.cmake @@ -430,7 +430,7 @@ endif() # Add standard dependencies find_package(IlmBase REQUIRED COMPONENTS Half) -find_package(TBB REQUIRED COMPONENTS tbb) +find_package(TBB CONFIG REQUIRED) find_package(ZLIB REQUIRED) if(NOT OPENVDB_USE_STATIC_LIBS AND NOT Boost_USE_STATIC_LIBS) diff --git a/openvdb/CMakeLists.txt b/openvdb/CMakeLists.txt index 45b302c..e208bcf 100644 --- a/openvdb/CMakeLists.txt +++ b/openvdb/CMakeLists.txt @@ -47,7 +47,7 @@ message(STATUS "----------------------------------------------------") ########################################################################## # Collect and configure lib dependencies - +if(0) if(USE_EXR) find_package(IlmBase ${MINIMUM_ILMBASE_VERSION} REQUIRED) find_package(OpenEXR ${MINIMUM_OPENEXR_VERSION} REQUIRED) @@ -57,8 +57,14 @@ if(USE_EXR) "is deprecated and will be removed.") endif() endif() +endif() +endif() + +if(USE_EXR) + find_package(IlmBase REQUIRED) + find_package(OpenEXR REQUIRED) else() - find_package(IlmBase ${MINIMUM_ILMBASE_VERSION} REQUIRED COMPONENTS Half) + find_package(IlmBase REQUIRED COMPONENTS Half) endif() if(OPENVDB_FUTURE_DEPRECATION AND FUTURE_MINIMUM_ILMBASE_VERSION) @@ -68,7 +74,7 @@ if(OPENVDB_FUTURE_DEPRECATION AND FUTURE_MINIMUM_ILMBASE_VERSION) endif() endif() -find_package(TBB ${MINIMUM_TBB_VERSION} REQUIRED COMPONENTS tbb) +find_package(TBB CONFIG REQUIRED) if(OPENVDB_FUTURE_DEPRECATION AND FUTURE_MINIMUM_TBB_VERSION) if(${Tbb_VERSION} VERSION_LESS FUTURE_MINIMUM_TBB_VERSION) diff --git a/openvdb/cmd/CMakeLists.txt b/openvdb/cmd/CMakeLists.txt index 2b831bb..2fa11d4 100644 --- a/openvdb/cmd/CMakeLists.txt +++ b/openvdb/cmd/CMakeLists.txt @@ -50,7 +50,7 @@ if(CONCURRENT_MALLOC STREQUAL "Jemalloc") find_package(Jemalloc REQUIRED) list(APPEND OPENVDB_BINARIES_DEPENDENT_LIBS Jemalloc::jemalloc) elseif(CONCURRENT_MALLOC STREQUAL "Tbbmalloc") - find_package(TBB ${MINIMUM_TBB_VERSION} REQUIRED COMPONENTS tbbmalloc) + find_package(TBB CONFIG REQUIRED) list(APPEND OPENVDB_BINARIES_DEPENDENT_LIBS TBB::tbbmalloc) endif()