diff --git a/cmake/defaults/Packages.cmake b/cmake/defaults/Packages.cmake index 4e9066ca3a4..fac7de9937d 100644 --- a/cmake/defaults/Packages.cmake +++ b/cmake/defaults/Packages.cmake @@ -102,16 +102,10 @@ endif() # --TBB -find_package(TBB CONFIG) -if(TBB_DIR) - # Found in CONFIG mode. - set(TBB_tbb_LIBRARY TBB::tbb) - set(PXR_FIND_TBB_IN_CONFIG ON) -else() +find_package(TBB CONFIG COMPONENTS tbb) +if(NOT TBB_FOUND) find_package(TBB REQUIRED COMPONENTS tbb) - set(PXR_FIND_TBB_IN_CONFIG OFF) endif() -add_definitions(${TBB_DEFINITIONS}) # --math if(WIN32) diff --git a/cmake/modules/FindTBB.cmake b/cmake/modules/FindTBB.cmake index 1da6fe695aa..8e1494feca7 100644 --- a/cmake/modules/FindTBB.cmake +++ b/cmake/modules/FindTBB.cmake @@ -137,21 +137,27 @@ if(NOT TBB_FOUND) set(TBB_ARCHITECTURE "ia32") endif() - # Set the TBB search library path search suffix based on the version of VC + # Set the TBB search library/runtime path search suffix based on the version of VC if(WINDOWS_STORE) set(TBB_LIB_PATH_SUFFIX "lib/${TBB_ARCHITECTURE}/vc11_ui") + set(TBB_RUNTIME_PATH_SUFFIX "bin/${TBB_ARCHITECTURE}/vc11_ui") elseif(MSVC14) set(TBB_LIB_PATH_SUFFIX "lib/${TBB_ARCHITECTURE}/vc14") + set(TBB_RUNTIME_PATH_SUFFIX "bin/${TBB_ARCHITECTURE}/vc14") elseif(MSVC12) set(TBB_LIB_PATH_SUFFIX "lib/${TBB_ARCHITECTURE}/vc12") + set(TBB_RUNTIME_PATH_SUFFIX "bin/${TBB_ARCHITECTURE}/vc12") elseif(MSVC11) set(TBB_LIB_PATH_SUFFIX "lib/${TBB_ARCHITECTURE}/vc11") + set(TBB_RUNTIME_PATH_SUFFIX "bin/${TBB_ARCHITECTURE}/vc11") elseif(MSVC10) set(TBB_LIB_PATH_SUFFIX "lib/${TBB_ARCHITECTURE}/vc10") + set(TBB_RUNTIME_PATH_SUFFIX "bin/${TBB_ARCHITECTURE}/vc10") endif() - # Add the library path search suffix for the VC independent version of TBB + # Add the library/runtime path search suffix for the VC independent version of TBB list(APPEND TBB_LIB_PATH_SUFFIX "lib/${TBB_ARCHITECTURE}/vc_mt") + list(APPEND TBB_RUNTIME_PATH_SUFFIX "bin/${TBB_ARCHITECTURE}/vc_mt") elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin") # OS X @@ -176,12 +182,13 @@ if(NOT TBB_FOUND) endif() endif() - # The above TBB_LIB_PATH_SUFFIX is based on where Intel puts the libraries + # The above TBB_LIB_PATH_SUFFIX/TBB_RUNTIME_PATH_SUFFIX is based on where Intel puts the libraries # in the package of prebuilt libraries it distributes. However, users may - # install these shared libraries into the more conventional "lib" directory + # install these shared libraries into the more conventional "lib"/"bin" directory # (especially when building from source), so we add that as an additional # location to search. list(APPEND TBB_LIB_PATH_SUFFIX "lib") + list(APPEND TBB_RUNTIME_PATH_SUFFIX "bin") ################################## # Find the TBB include dir @@ -224,13 +231,13 @@ if(NOT TBB_FOUND) endif() if(TBB_VERSION VERSION_LESS 4.3) - set(TBB_SEARCH_COMPOMPONENTS tbb_preview tbbmalloc tbb) + set(TBB_SEARCH_COMPONENTS tbb_preview tbbmalloc tbb) else() - set(TBB_SEARCH_COMPOMPONENTS tbb_preview tbbmalloc_proxy tbbmalloc tbb) + set(TBB_SEARCH_COMPONENTS tbb_preview tbbmalloc_proxy tbbmalloc tbb) endif() # Find each component - foreach(_comp ${TBB_SEARCH_COMPOMPONENTS}) + foreach(_comp ${TBB_SEARCH_COMPONENTS}) if(";${TBB_FIND_COMPONENTS};tbb" MATCHES ";${_comp};") if(${_comp} STREQUAL tbb) @@ -250,6 +257,32 @@ if(NOT TBB_FOUND) PATHS ${TBB_DEFAULT_SEARCH_DIR} ENV LIBRARY_PATH PATH_SUFFIXES ${TBB_LIB_PATH_SUFFIX}) + # On Windows platforms also looks for .dll binaries. + # If we find some, assume TBB is built as a shared library with the .lib/.dll pair, + # otherwise assume it is built as a static library + set(TBB_${_comp}_TARGET_TYPE SHARED) + if(WIN32) + find_file(TBB_${_comp}_SHARED_LIBRARY_RELEASE + NAMES ${CMAKE_SHARED_LIBRARY_PREFIX}${_lib_name}${CMAKE_SHARED_LIBRARY_SUFFIX} + HINTS ${TBB_LIBRARY} ${TBB_SEARCH_DIR} + PATHS ${TBB_DEFAULT_SEARCH_DIR} ENV LIBRARY_PATH + PATH_SUFFIXES ${TBB_RUNTIME_PATH_SUFFIX}) + + find_file(TBB_${_comp}_SHARED_LIBRARY_DEBUG + NAMES ${CMAKE_SHARED_LIBRARY_PREFIX}${_lib_name}_debug${CMAKE_SHARED_LIBRARY_SUFFIX} + HINTS ${TBB_LIBRARY} ${TBB_SEARCH_DIR} + PATHS ${TBB_DEFAULT_SEARCH_DIR} ENV LIBRARY_PATH + PATH_SUFFIXES ${TBB_RUNTIME_PATH_SUFFIX}) + + if(TBB_${_comp}_LIBRARY_RELEASE AND TBB_${_comp}_SHARED_LIBRARY_RELEASE) + set(TBB_${_comp}_TARGET_TYPE SHARED) + elseif(TBB_${_comp}_LIBRARY_DEBUG AND TBB_${_comp}_SHARED_LIBRARY_DEBUG) + set(TBB_${_comp}_TARGET_TYPE SHARED) + else() + set(TBB_${_comp}_TARGET_TYPE STATIC) + endif() + endif() + if(TBB_${_comp}_LIBRARY_DEBUG) list(APPEND TBB_LIBRARIES_DEBUG "${TBB_${_comp}_LIBRARY_DEBUG}") endif() @@ -270,6 +303,7 @@ if(NOT TBB_FOUND) mark_as_advanced(TBB_${_comp}_LIBRARY_RELEASE) mark_as_advanced(TBB_${_comp}_LIBRARY_DEBUG) mark_as_advanced(TBB_${_comp}_LIBRARY) + mark_as_advanced(TBB_${_comp}_TARGET_TYPE) endif() endforeach() @@ -302,26 +336,61 @@ if(NOT TBB_FOUND) ################################## if(NOT CMAKE_VERSION VERSION_LESS 3.0 AND TBB_FOUND) - add_library(TBB::tbb SHARED IMPORTED) - set_target_properties(TBB::tbb PROPERTIES - INTERFACE_INCLUDE_DIRECTORIES ${TBB_INCLUDE_DIRS} - IMPORTED_LOCATION ${TBB_LIBRARIES}) - if(TBB_LIBRARIES_RELEASE AND TBB_LIBRARIES_DEBUG) - set_target_properties(TBB::tbb PROPERTIES - INTERFACE_COMPILE_DEFINITIONS "$<$,$>:TBB_USE_DEBUG=1>" - IMPORTED_LOCATION_DEBUG ${TBB_LIBRARIES_DEBUG} - IMPORTED_LOCATION_RELWITHDEBINFO ${TBB_LIBRARIES_DEBUG} - IMPORTED_LOCATION_RELEASE ${TBB_LIBRARIES_RELEASE} - IMPORTED_LOCATION_MINSIZEREL ${TBB_LIBRARIES_RELEASE} - ) - elseif(TBB_LIBRARIES_RELEASE) - set_target_properties(TBB::tbb PROPERTIES IMPORTED_LOCATION ${TBB_LIBRARIES_RELEASE}) - else() - set_target_properties(TBB::tbb PROPERTIES - INTERFACE_COMPILE_DEFINITIONS "${TBB_DEFINITIONS_DEBUG}" - IMPORTED_LOCATION ${TBB_LIBRARIES_DEBUG} - ) - endif() + + foreach(_comp ${TBB_SEARCH_COMPONENTS}) + if(";${TBB_FIND_COMPONENTS};tbb" MATCHES ";${_comp};") + + add_library(TBB::${_comp} ${TBB_${_comp}_TARGET_TYPE} IMPORTED) + set_property(TARGET TBB::${_comp} APPEND PROPERTY + INTERFACE_INCLUDE_DIRECTORIES ${TBB_INCLUDE_DIRS} + ) + + if(WIN32 AND TBB_${_comp}_SHARED_LIBRARY_${TBB_BUILD_TYPE}) + set_target_properties(TBB::${_comp} PROPERTIES + IMPORTED_IMPLIB ${TBB_${_comp}_LIBRARY_${TBB_BUILD_TYPE}} + IMPORTED_LOCATION ${TBB_${_comp}_SHARED_LIBRARY_${TBB_BUILD_TYPE}}) + else() + set_target_properties(TBB::${_comp} PROPERTIES + IMPORTED_LOCATION ${TBB_${_comp}_LIBRARY_${TBB_BUILD_TYPE}}) + endif() + + if(TBB_${_comp}_LIBRARY_DEBUG) + set_property(TARGET TBB::${_comp} APPEND PROPERTY IMPORTED_CONFIGURATIONS DEBUG) + set_property(TARGET TBB::${_comp} APPEND PROPERTY INTERFACE_COMPILE_DEFINITIONS "$<$,$>:TBB_USE_DEBUG=1>") + + if(WIN32 AND TBB_${_comp}_SHARED_LIBRARY_DEBUG) + set_target_properties(TBB::${_comp} PROPERTIES + IMPORTED_IMPLIB_DEBUG ${TBB_${_comp}_LIBRARY_DEBUG} + IMPORTED_IMPLIB_RELWITHDEBINFO ${TBB_${_comp}_LIBRARY_DEBUG} + + IMPORTED_LOCATION_DEBUG ${TBB_${_comp}_SHARED_LIBRARY_DEBUG} + IMPORTED_LOCATION_RELWITHDEBINFO ${TBB_${_comp}_SHARED_LIBRARY_DEBUG}) + else() + set_target_properties(TBB::${_comp} PROPERTIES + IMPORTED_LOCATION_DEBUG ${TBB_${_comp}_LIBRARY_DEBUG} + IMPORTED_LOCATION_RELWITHDEBINFO ${TBB_${_comp}_LIBRARY_DEBUG}) + endif() + endif() + + if(TBB_${_comp}_LIBRARY_RELEASE) + set_property(TARGET TBB::${_comp} APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE) + + if(WIN32 AND TBB_${_comp}_SHARED_LIBRARY_RELEASE) + set_target_properties(TBB::${_comp} PROPERTIES + IMPORTED_IMPLIB_RELEASE ${TBB_${_comp}_LIBRARY_RELEASE} + IMPORTED_IMPLIB_MINSIZEREL ${TBB_${_comp}_LIBRARY_RELEASE} + + IMPORTED_LOCATION_RELEASE ${TBB_${_comp}_SHARED_LIBRARY_RELEASE} + IMPORTED_LOCATION_MINSIZEREL ${TBB_${_comp}_SHARED_LIBRARY_RELEASE}) + else() + set_target_properties(TBB::${_comp} PROPERTIES + IMPORTED_LOCATION_RELEASE ${TBB_${_comp}_LIBRARY_RELEASE} + IMPORTED_LOCATION_MINSIZEREL ${TBB_${_comp}_LIBRARY_RELEASE}) + endif() + endif() + + endif() + endforeach() endif() mark_as_advanced(TBB_INCLUDE_DIRS TBB_LIBRARIES) diff --git a/pxr/base/plug/CMakeLists.txt b/pxr/base/plug/CMakeLists.txt index 5693921352e..2b15ae54a2c 100644 --- a/pxr/base/plug/CMakeLists.txt +++ b/pxr/base/plug/CMakeLists.txt @@ -8,10 +8,7 @@ pxr_library(plug js trace work - ${TBB_tbb_LIBRARY} - - INCLUDE_DIRS - ${TBB_INCLUDE_DIRS} + TBB::tbb PUBLIC_CLASSES interfaceFactory diff --git a/pxr/base/tf/CMakeLists.txt b/pxr/base/tf/CMakeLists.txt index 438e9af37b8..fade8d559b5 100644 --- a/pxr/base/tf/CMakeLists.txt +++ b/pxr/base/tf/CMakeLists.txt @@ -114,10 +114,7 @@ pxr_library(tf LIBRARIES arch ${WINLIBS} - ${TBB_tbb_LIBRARY} - - INCLUDE_DIRS - ${TBB_INCLUDE_DIRS} + TBB::tbb PUBLIC_CLASSES anyUniquePtr diff --git a/pxr/base/trace/CMakeLists.txt b/pxr/base/trace/CMakeLists.txt index 959606c4e97..f8e74b31369 100644 --- a/pxr/base/trace/CMakeLists.txt +++ b/pxr/base/trace/CMakeLists.txt @@ -6,10 +6,7 @@ pxr_library(trace arch js tf - ${TBB_tbb_LIBRARY} - - INCLUDE_DIRS - ${TBB_INCLUDE_DIRS} + TBB::tbb PUBLIC_CLASSES aggregateTree diff --git a/pxr/base/vt/CMakeLists.txt b/pxr/base/vt/CMakeLists.txt index 5f983234759..5f1a2860054 100644 --- a/pxr/base/vt/CMakeLists.txt +++ b/pxr/base/vt/CMakeLists.txt @@ -7,10 +7,7 @@ pxr_library(vt tf gf trace - ${TBB_tbb_LIBRARY} - - INCLUDE_DIRS - ${TBB_INCLUDE_DIRS} + TBB::tbb PUBLIC_CLASSES array diff --git a/pxr/base/work/CMakeLists.txt b/pxr/base/work/CMakeLists.txt index 424d6c02c6d..28e7c4d579a 100644 --- a/pxr/base/work/CMakeLists.txt +++ b/pxr/base/work/CMakeLists.txt @@ -5,10 +5,7 @@ pxr_library(work LIBRARIES tf trace - ${TBB_tbb_LIBRARY} - - INCLUDE_DIRS - ${TBB_INCLUDE_DIRS} + TBB::tbb PUBLIC_CLASSES detachedTask diff --git a/pxr/imaging/hd/CMakeLists.txt b/pxr/imaging/hd/CMakeLists.txt index 1fd2c38e3c3..1d243e17866 100644 --- a/pxr/imaging/hd/CMakeLists.txt +++ b/pxr/imaging/hd/CMakeLists.txt @@ -15,10 +15,7 @@ pxr_library(hd hf pxOsd sdr - ${TBB_tbb_LIBRARY} - - INCLUDE_DIRS - ${TBB_INCLUDE_DIRS} + TBB::tbb PUBLIC_CLASSES aov diff --git a/pxr/imaging/hdGp/CMakeLists.txt b/pxr/imaging/hdGp/CMakeLists.txt index 779a38bb427..87d91496f3f 100644 --- a/pxr/imaging/hdGp/CMakeLists.txt +++ b/pxr/imaging/hdGp/CMakeLists.txt @@ -7,10 +7,7 @@ pxr_library(hdGp LIBRARIES hd hf - ${TBB_tbb_LIBRARY} - - INCLUDE_DIRS - ${TBB_INCLUDE_DIRS} + TBB::tbb PUBLIC_CLASSES generativeProcedural diff --git a/pxr/imaging/hdSt/CMakeLists.txt b/pxr/imaging/hdSt/CMakeLists.txt index 7b4624cdb4d..928cff4c2b7 100644 --- a/pxr/imaging/hdSt/CMakeLists.txt +++ b/pxr/imaging/hdSt/CMakeLists.txt @@ -46,12 +46,11 @@ pxr_library(hdSt sdr tf trace - ${TBB_tbb_LIBRARY} + TBB::tbb ${OPENSUBDIV_LIBRARIES} ${optionalLibs} INCLUDE_DIRS - ${TBB_INCLUDE_DIRS} ${OPENSUBDIV_INCLUDE_DIR} ${optionalIncludeDirs} diff --git a/pxr/imaging/hdsi/CMakeLists.txt b/pxr/imaging/hdsi/CMakeLists.txt index 9ba736a6edb..5f7c70b4eb6 100644 --- a/pxr/imaging/hdsi/CMakeLists.txt +++ b/pxr/imaging/hdsi/CMakeLists.txt @@ -14,6 +14,7 @@ pxr_library(hdsi hf hd pxOsd + TBB::tbb PUBLIC_CLASSES computeSceneIndexDiff diff --git a/pxr/imaging/plugin/hdEmbree/CMakeLists.txt b/pxr/imaging/plugin/hdEmbree/CMakeLists.txt index 43aa0826e5d..96ac989d6cd 100644 --- a/pxr/imaging/plugin/hdEmbree/CMakeLists.txt +++ b/pxr/imaging/plugin/hdEmbree/CMakeLists.txt @@ -21,11 +21,9 @@ pxr_plugin(hdEmbree hf hd hdx - ${TBB_tbb_LIBRARY} ${EMBREE_LIBRARY} INCLUDE_DIRS - ${TBB_INCLUDE_DIRS} ${EMBREE_INCLUDE_DIR} PUBLIC_CLASSES diff --git a/pxr/imaging/plugin/hdEmbree/pch.h b/pxr/imaging/plugin/hdEmbree/pch.h index 9f613dd069c..4e16a844d78 100644 --- a/pxr/imaging/plugin/hdEmbree/pch.h +++ b/pxr/imaging/plugin/hdEmbree/pch.h @@ -79,15 +79,6 @@ #include #include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include #ifdef PXR_PYTHON_SUPPORT_ENABLED #include "pxr/base/tf/pySafePython.h" #endif // PXR_PYTHON_SUPPORT_ENABLED diff --git a/pxr/imaging/plugin/hdStorm/CMakeLists.txt b/pxr/imaging/plugin/hdStorm/CMakeLists.txt index 043f2d363bc..c1805b6014d 100644 --- a/pxr/imaging/plugin/hdStorm/CMakeLists.txt +++ b/pxr/imaging/plugin/hdStorm/CMakeLists.txt @@ -26,10 +26,8 @@ pxr_plugin(hdStorm hd hdSt ${OPENSUBDIV_LIBRARIES} - ${TBB_tbb_LIBRARY} INCLUDE_DIRS - ${TBB_INCLUDE_DIRS} ${OPENSUBDIV_INCLUDE_DIR} PUBLIC_CLASSES diff --git a/pxr/imaging/plugin/hdStorm/pch.h b/pxr/imaging/plugin/hdStorm/pch.h index ce57bbcbdc4..883b8c2c3fc 100644 --- a/pxr/imaging/plugin/hdStorm/pch.h +++ b/pxr/imaging/plugin/hdStorm/pch.h @@ -70,10 +70,6 @@ #include #include #include -#include -#include -#include -#include #ifdef PXR_PYTHON_SUPPORT_ENABLED #include "pxr/base/tf/pySafePython.h" #endif // PXR_PYTHON_SUPPORT_ENABLED diff --git a/pxr/pxrConfig.cmake.in b/pxr/pxrConfig.cmake.in index a7e566bac2b..8a32d78322c 100644 --- a/pxr/pxrConfig.cmake.in +++ b/pxr/pxrConfig.cmake.in @@ -18,6 +18,8 @@ set(PXR_VERSION "@PXR_VERSION@") include(CMakeFindDependencyMacro) +find_dependency(TBB) + # If Python support was enabled for this USD build, find the import # targets by invoking the appropriate FindPython module. Use the same # LIBRARY and INCLUDE_DIR settings from the original build if they diff --git a/pxr/usd/ar/CMakeLists.txt b/pxr/usd/ar/CMakeLists.txt index bd77e0e311a..a0cd04365bd 100644 --- a/pxr/usd/ar/CMakeLists.txt +++ b/pxr/usd/ar/CMakeLists.txt @@ -8,10 +8,7 @@ pxr_library(ar tf plug vt - ${TBB_tbb_LIBRARY} - - INCLUDE_DIRS - ${TBB_INCLUDE_DIRS} + TBB::tbb PUBLIC_CLASSES asset diff --git a/pxr/usd/ar/resolver.cpp b/pxr/usd/ar/resolver.cpp index a902291098f..19acab45915 100644 --- a/pxr/usd/ar/resolver.cpp +++ b/pxr/usd/ar/resolver.cpp @@ -35,6 +35,7 @@ #include "pxr/base/tf/unicodeUtils.h" #include +#include #include #include diff --git a/pxr/usd/pcp/CMakeLists.txt b/pxr/usd/pcp/CMakeLists.txt index ce65e7bff18..a5d9ea86292 100644 --- a/pxr/usd/pcp/CMakeLists.txt +++ b/pxr/usd/pcp/CMakeLists.txt @@ -9,10 +9,7 @@ pxr_library(pcp sdf work ar - ${TBB_tbb_LIBRARY} - - INCLUDE_DIRS - ${TBB_INCLUDE_DIRS} + TBB::tbb PUBLIC_HEADERS api.h diff --git a/pxr/usd/sdf/CMakeLists.txt b/pxr/usd/sdf/CMakeLists.txt index f498c29e904..f1d7026ebf0 100644 --- a/pxr/usd/sdf/CMakeLists.txt +++ b/pxr/usd/sdf/CMakeLists.txt @@ -12,10 +12,7 @@ pxr_library(sdf vt work ar - ${TBB_tbb_LIBRARY} - - INCLUDE_DIRS - ${TBB_INCLUDE_DIRS} + TBB::tbb PUBLIC_CLASSES abstractData diff --git a/pxr/usd/usd/CMakeLists.txt b/pxr/usd/usd/CMakeLists.txt index 5ba0d6f56ed..316341d89c4 100644 --- a/pxr/usd/usd/CMakeLists.txt +++ b/pxr/usd/usd/CMakeLists.txt @@ -16,10 +16,7 @@ pxr_library(usd ts vt work - ${TBB_tbb_LIBRARY} - - INCLUDE_DIRS - ${TBB_INCLUDE_DIRS} + TBB::tbb PUBLIC_CLASSES attribute @@ -425,6 +422,7 @@ pxr_build_test(testUsdThreadedAuthoring work sdf usd + TBB::tbb CPPFILES testenv/testUsdThreadedAuthoring.cpp ) diff --git a/pxr/usd/usdGeom/CMakeLists.txt b/pxr/usd/usdGeom/CMakeLists.txt index f132786e647..58f21725846 100644 --- a/pxr/usd/usdGeom/CMakeLists.txt +++ b/pxr/usd/usdGeom/CMakeLists.txt @@ -13,10 +13,7 @@ pxr_library(usdGeom trace usd work - ${TBB_tbb_LIBRARY} - - INCLUDE_DIRS - ${TBB_INCLUDE_DIRS} + TBB::tbb PUBLIC_CLASSES debugCodes diff --git a/pxr/usd/usdHydra/pch.h b/pxr/usd/usdHydra/pch.h index 79c701fce34..4b7476f5c98 100644 --- a/pxr/usd/usdHydra/pch.h +++ b/pxr/usd/usdHydra/pch.h @@ -72,17 +72,6 @@ #include #include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include #ifdef PXR_PYTHON_SUPPORT_ENABLED #include "pxr/base/tf/pySafePython.h" #endif // PXR_PYTHON_SUPPORT_ENABLED diff --git a/pxr/usd/usdLux/pch.h b/pxr/usd/usdLux/pch.h index e2b9d346d49..609f90a2b2c 100644 --- a/pxr/usd/usdLux/pch.h +++ b/pxr/usd/usdLux/pch.h @@ -74,17 +74,6 @@ #include #include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include #ifdef PXR_PYTHON_SUPPORT_ENABLED #include "pxr/base/tf/pySafePython.h" #endif // PXR_PYTHON_SUPPORT_ENABLED diff --git a/pxr/usd/usdMedia/pch.h b/pxr/usd/usdMedia/pch.h index 539da3fc817..80e1590fdeb 100644 --- a/pxr/usd/usdMedia/pch.h +++ b/pxr/usd/usdMedia/pch.h @@ -73,17 +73,6 @@ #include #include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include #ifdef PXR_PYTHON_SUPPORT_ENABLED #include "pxr/base/tf/pySafePython.h" #endif // PXR_PYTHON_SUPPORT_ENABLED diff --git a/pxr/usd/usdMtlx/pch.h b/pxr/usd/usdMtlx/pch.h index a74ce075840..9a2c19f4a74 100644 --- a/pxr/usd/usdMtlx/pch.h +++ b/pxr/usd/usdMtlx/pch.h @@ -94,18 +94,6 @@ #include #include #endif // PXR_MATERIALX_SUPPORT_ENABLED -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include #ifdef PXR_PYTHON_SUPPORT_ENABLED #include "pxr/base/tf/pySafePython.h" #endif // PXR_PYTHON_SUPPORT_ENABLED diff --git a/pxr/usd/usdPhysics/CMakeLists.txt b/pxr/usd/usdPhysics/CMakeLists.txt index c29497d480d..dcec0349b53 100644 --- a/pxr/usd/usdPhysics/CMakeLists.txt +++ b/pxr/usd/usdPhysics/CMakeLists.txt @@ -14,10 +14,6 @@ pxr_library(usdPhysics usdGeom usdShade work - ${TBB_tbb_LIBRARY} - - INCLUDE_DIRS - ${TBB_INCLUDE_DIRS} PUBLIC_CLASSES metrics diff --git a/pxr/usd/usdPhysics/pch.h b/pxr/usd/usdPhysics/pch.h index 64254bc915a..80e1590fdeb 100644 --- a/pxr/usd/usdPhysics/pch.h +++ b/pxr/usd/usdPhysics/pch.h @@ -73,18 +73,6 @@ #include #include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include #ifdef PXR_PYTHON_SUPPORT_ENABLED #include "pxr/base/tf/pySafePython.h" #endif // PXR_PYTHON_SUPPORT_ENABLED diff --git a/pxr/usd/usdProc/pch.h b/pxr/usd/usdProc/pch.h index 539da3fc817..80e1590fdeb 100644 --- a/pxr/usd/usdProc/pch.h +++ b/pxr/usd/usdProc/pch.h @@ -73,17 +73,6 @@ #include #include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include #ifdef PXR_PYTHON_SUPPORT_ENABLED #include "pxr/base/tf/pySafePython.h" #endif // PXR_PYTHON_SUPPORT_ENABLED diff --git a/pxr/usd/usdRender/pch.h b/pxr/usd/usdRender/pch.h index 24195d70e29..80d1f23ed24 100644 --- a/pxr/usd/usdRender/pch.h +++ b/pxr/usd/usdRender/pch.h @@ -74,17 +74,6 @@ #include #include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include #ifdef PXR_PYTHON_SUPPORT_ENABLED #include "pxr/base/tf/pySafePython.h" #endif // PXR_PYTHON_SUPPORT_ENABLED diff --git a/pxr/usd/usdRi/pch.h b/pxr/usd/usdRi/pch.h index 539da3fc817..80e1590fdeb 100644 --- a/pxr/usd/usdRi/pch.h +++ b/pxr/usd/usdRi/pch.h @@ -73,17 +73,6 @@ #include #include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include #ifdef PXR_PYTHON_SUPPORT_ENABLED #include "pxr/base/tf/pySafePython.h" #endif // PXR_PYTHON_SUPPORT_ENABLED diff --git a/pxr/usd/usdShade/CMakeLists.txt b/pxr/usd/usdShade/CMakeLists.txt index 30200e096fe..abb83b54796 100644 --- a/pxr/usd/usdShade/CMakeLists.txt +++ b/pxr/usd/usdShade/CMakeLists.txt @@ -12,11 +12,8 @@ pxr_library(usdShade sdr usd usdGeom - ${TBB_tbb_LIBRARY} + TBB::tbb - INCLUDE_DIRS - ${TBB_INCLUDE_DIRS} - PUBLIC_CLASSES connectableAPIBehavior input diff --git a/pxr/usd/usdSkel/CMakeLists.txt b/pxr/usd/usdSkel/CMakeLists.txt index 45ea62854de..020a4a1e72d 100644 --- a/pxr/usd/usdSkel/CMakeLists.txt +++ b/pxr/usd/usdSkel/CMakeLists.txt @@ -14,10 +14,7 @@ pxr_library(usdSkel sdf usd usdGeom - ${TBB_tbb_LIBRARY} - - INCLUDE_DIRS - ${TBB_INCLUDE_DIRS} + TBB::tbb PUBLIC_CLASSES animMapper diff --git a/pxr/usd/usdUI/pch.h b/pxr/usd/usdUI/pch.h index 583f60b1ab2..c9d85958743 100644 --- a/pxr/usd/usdUI/pch.h +++ b/pxr/usd/usdUI/pch.h @@ -71,17 +71,6 @@ #include #include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include #ifdef PXR_PYTHON_SUPPORT_ENABLED #include "pxr/base/tf/pySafePython.h" #endif // PXR_PYTHON_SUPPORT_ENABLED diff --git a/pxr/usd/usdUtils/CMakeLists.txt b/pxr/usd/usdUtils/CMakeLists.txt index 79b9b8ee25e..3d32522284d 100644 --- a/pxr/usd/usdUtils/CMakeLists.txt +++ b/pxr/usd/usdUtils/CMakeLists.txt @@ -10,10 +10,7 @@ pxr_library(usdUtils usd usdGeom usdShade - ${TBB_tbb_LIBRARY} - - INCLUDE_DIRS - ${TBB_INCLUDE_DIRS} + TBB::tbb PUBLIC_CLASSES authoring diff --git a/pxr/usdImaging/usdAppUtils/pch.h b/pxr/usdImaging/usdAppUtils/pch.h index e03acb0b355..175d56c3418 100644 --- a/pxr/usdImaging/usdAppUtils/pch.h +++ b/pxr/usdImaging/usdAppUtils/pch.h @@ -89,17 +89,6 @@ #include #include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include #ifdef PXR_PYTHON_SUPPORT_ENABLED #include "pxr/base/tf/pySafePython.h" #endif // PXR_PYTHON_SUPPORT_ENABLED diff --git a/pxr/usdImaging/usdImaging/CMakeLists.txt b/pxr/usdImaging/usdImaging/CMakeLists.txt index 8de012e79b5..51eb3f557de 100644 --- a/pxr/usdImaging/usdImaging/CMakeLists.txt +++ b/pxr/usdImaging/usdImaging/CMakeLists.txt @@ -22,10 +22,7 @@ pxr_library(usdImaging usdShade usdVol ar - ${TBB_tbb_LIBRARY} - - INCLUDE_DIRS - ${TBB_INCLUDE_DIRS} + TBB::tbb PUBLIC_CLASSES adapterRegistry diff --git a/pxr/usdImaging/usdImagingGL/CMakeLists.txt b/pxr/usdImaging/usdImagingGL/CMakeLists.txt index 594f45a8b2f..af8c2d72032 100644 --- a/pxr/usdImaging/usdImagingGL/CMakeLists.txt +++ b/pxr/usdImaging/usdImagingGL/CMakeLists.txt @@ -31,10 +31,6 @@ pxr_library(usdImagingGL usdShade usdImaging ar - ${TBB_tbb_LIBRARY} - - INCLUDE_DIRS - ${TBB_INCLUDE_DIRS} PUBLIC_CLASSES engine diff --git a/pxr/usdImaging/usdImagingGL/pch.h b/pxr/usdImaging/usdImagingGL/pch.h index 62296904fc5..1b21900e51a 100644 --- a/pxr/usdImaging/usdImagingGL/pch.h +++ b/pxr/usdImaging/usdImagingGL/pch.h @@ -79,18 +79,6 @@ #include #include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include #ifdef PXR_PYTHON_SUPPORT_ENABLED #include "pxr/base/tf/pySafePython.h" #endif // PXR_PYTHON_SUPPORT_ENABLED diff --git a/pxr/usdImaging/usdProcImaging/pch.h b/pxr/usdImaging/usdProcImaging/pch.h index bdf9ee3c165..3a5a0e6a7f6 100644 --- a/pxr/usdImaging/usdProcImaging/pch.h +++ b/pxr/usdImaging/usdProcImaging/pch.h @@ -75,18 +75,6 @@ #include #include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include #ifdef PXR_PYTHON_SUPPORT_ENABLED #include "pxr/base/tf/pySafePython.h" #endif // PXR_PYTHON_SUPPORT_ENABLED diff --git a/pxr/usdImaging/usdRiPxrImaging/CMakeLists.txt b/pxr/usdImaging/usdRiPxrImaging/CMakeLists.txt index 2b978360db3..a5105365ec0 100644 --- a/pxr/usdImaging/usdRiPxrImaging/CMakeLists.txt +++ b/pxr/usdImaging/usdRiPxrImaging/CMakeLists.txt @@ -19,10 +19,6 @@ pxr_library(usdRiPxrImaging usdImaging usdVol ar - ${TBB_tbb_LIBRARY} - - INCLUDE_DIRS - ${TBB_INCLUDE_DIRS} PUBLIC_CLASSES pxrAovLightAdapter diff --git a/pxr/usdImaging/usdRiPxrImaging/pch.h b/pxr/usdImaging/usdRiPxrImaging/pch.h index bdf9ee3c165..3a5a0e6a7f6 100644 --- a/pxr/usdImaging/usdRiPxrImaging/pch.h +++ b/pxr/usdImaging/usdRiPxrImaging/pch.h @@ -75,18 +75,6 @@ #include #include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include #ifdef PXR_PYTHON_SUPPORT_ENABLED #include "pxr/base/tf/pySafePython.h" #endif // PXR_PYTHON_SUPPORT_ENABLED diff --git a/pxr/usdImaging/usdSkelImaging/pch.h b/pxr/usdImaging/usdSkelImaging/pch.h index 59eab4ddcad..3a5a0e6a7f6 100644 --- a/pxr/usdImaging/usdSkelImaging/pch.h +++ b/pxr/usdImaging/usdSkelImaging/pch.h @@ -75,20 +75,6 @@ #include #include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include #ifdef PXR_PYTHON_SUPPORT_ENABLED #include "pxr/base/tf/pySafePython.h" #endif // PXR_PYTHON_SUPPORT_ENABLED diff --git a/pxr/usdImaging/usdVolImaging/pch.h b/pxr/usdImaging/usdVolImaging/pch.h index bdf9ee3c165..3a5a0e6a7f6 100644 --- a/pxr/usdImaging/usdVolImaging/pch.h +++ b/pxr/usdImaging/usdVolImaging/pch.h @@ -75,18 +75,6 @@ #include #include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include #ifdef PXR_PYTHON_SUPPORT_ENABLED #include "pxr/base/tf/pySafePython.h" #endif // PXR_PYTHON_SUPPORT_ENABLED diff --git a/pxr/usdImaging/usdviewq/pch.h b/pxr/usdImaging/usdviewq/pch.h index e2b9d346d49..609f90a2b2c 100644 --- a/pxr/usdImaging/usdviewq/pch.h +++ b/pxr/usdImaging/usdviewq/pch.h @@ -74,17 +74,6 @@ #include #include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include #ifdef PXR_PYTHON_SUPPORT_ENABLED #include "pxr/base/tf/pySafePython.h" #endif // PXR_PYTHON_SUPPORT_ENABLED diff --git a/pxr/usdValidation/usdValidation/CMakeLists.txt b/pxr/usdValidation/usdValidation/CMakeLists.txt index 9f29881110c..ec9edb9b05e 100644 --- a/pxr/usdValidation/usdValidation/CMakeLists.txt +++ b/pxr/usdValidation/usdValidation/CMakeLists.txt @@ -9,10 +9,6 @@ pxr_library(usdValidation gf usd work - ${TBB_tbb_LIBRARY} - - INCLUDE_DIRS - ${TBB_INCLUDE_DIRS} PUBLIC_CLASSES context diff --git a/third_party/renderman-26/plugin/hdPrman/CMakeLists.txt b/third_party/renderman-26/plugin/hdPrman/CMakeLists.txt index 9994ab54e57..f73be1e3fe7 100644 --- a/third_party/renderman-26/plugin/hdPrman/CMakeLists.txt +++ b/third_party/renderman-26/plugin/hdPrman/CMakeLists.txt @@ -80,6 +80,7 @@ pxr_plugin(${PXR_PACKAGE} usdRi usdVol usdVolImaging + TBB::tbb ${optionalLibs} INCLUDE_DIRS