File system-tbb.patch of Package OpenUSD
diff --git a/cmake/defaults/Packages.cmake b/cmake/defaults/Packages.cmake
index 06e286089..a7f2b6e3d 100644
--- a/cmake/defaults/Packages.cmake
+++ b/cmake/defaults/Packages.cmake
@@ -130,7 +130,7 @@ endif()
# --TBB
-find_package(TBB REQUIRED COMPONENTS tbb)
+find_package(TBB REQUIRED CONFIG)
add_definitions(${TBB_DEFINITIONS})
# --math
diff --git a/cmake/modules/FindTBB.cmake b/cmake/modules/FindTBB.cmake
index 1da6fe695..43ee24aa6 100644
--- a/cmake/modules/FindTBB.cmake
+++ b/cmake/modules/FindTBB.cmake
@@ -210,6 +210,7 @@ if(NOT TBB_FOUND)
string(REGEX REPLACE ".*#define TBB_INTERFACE_VERSION ([0-9]+).*" "\\1"
TBB_INTERFACE_VERSION "${_tbb_version_file}")
set(TBB_VERSION "${TBB_VERSION_MAJOR}.${TBB_VERSION_MINOR}")
+ message(TBB_VERSION)
endif()
##################################
diff --git a/pxr/base/plug/CMakeLists.txt b/pxr/base/plug/CMakeLists.txt
index 569392135..fb5d92985 100644
--- a/pxr/base/plug/CMakeLists.txt
+++ b/pxr/base/plug/CMakeLists.txt
@@ -8,7 +8,7 @@ pxr_library(plug
js
trace
work
- ${TBB_tbb_LIBRARY}
+ TBB::tbb
INCLUDE_DIRS
${TBB_INCLUDE_DIRS}
diff --git a/pxr/base/tf/CMakeLists.txt b/pxr/base/tf/CMakeLists.txt
index 438e9af37..ae91bc1c1 100644
--- a/pxr/base/tf/CMakeLists.txt
+++ b/pxr/base/tf/CMakeLists.txt
@@ -114,7 +114,7 @@ pxr_library(tf
LIBRARIES
arch
${WINLIBS}
- ${TBB_tbb_LIBRARY}
+ TBB::tbb
INCLUDE_DIRS
${TBB_INCLUDE_DIRS}
diff --git a/pxr/base/trace/CMakeLists.txt b/pxr/base/trace/CMakeLists.txt
index 959606c4e..4cbc11613 100644
--- a/pxr/base/trace/CMakeLists.txt
+++ b/pxr/base/trace/CMakeLists.txt
@@ -6,7 +6,7 @@ pxr_library(trace
arch
js
tf
- ${TBB_tbb_LIBRARY}
+ TBB::tbb
INCLUDE_DIRS
${TBB_INCLUDE_DIRS}
diff --git a/pxr/base/vt/CMakeLists.txt b/pxr/base/vt/CMakeLists.txt
index 5f9832347..bb7a4966b 100644
--- a/pxr/base/vt/CMakeLists.txt
+++ b/pxr/base/vt/CMakeLists.txt
@@ -7,7 +7,7 @@ pxr_library(vt
tf
gf
trace
- ${TBB_tbb_LIBRARY}
+ TBB::tbb
INCLUDE_DIRS
${TBB_INCLUDE_DIRS}
diff --git a/pxr/base/work/CMakeLists.txt b/pxr/base/work/CMakeLists.txt
index 424d6c02c..32c9f120b 100644
--- a/pxr/base/work/CMakeLists.txt
+++ b/pxr/base/work/CMakeLists.txt
@@ -5,7 +5,7 @@ pxr_library(work
LIBRARIES
tf
trace
- ${TBB_tbb_LIBRARY}
+ TBB::tbb
INCLUDE_DIRS
${TBB_INCLUDE_DIRS}
diff --git a/pxr/imaging/hd/CMakeLists.txt b/pxr/imaging/hd/CMakeLists.txt
index 1fd2c38e3..49f238399 100644
--- a/pxr/imaging/hd/CMakeLists.txt
+++ b/pxr/imaging/hd/CMakeLists.txt
@@ -15,7 +15,7 @@ pxr_library(hd
hf
pxOsd
sdr
- ${TBB_tbb_LIBRARY}
+ TBB::tbb
INCLUDE_DIRS
${TBB_INCLUDE_DIRS}
diff --git a/pxr/imaging/hdGp/CMakeLists.txt b/pxr/imaging/hdGp/CMakeLists.txt
index 779a38bb4..767af53a0 100644
--- a/pxr/imaging/hdGp/CMakeLists.txt
+++ b/pxr/imaging/hdGp/CMakeLists.txt
@@ -7,7 +7,7 @@ pxr_library(hdGp
LIBRARIES
hd
hf
- ${TBB_tbb_LIBRARY}
+ TBB::tbb
INCLUDE_DIRS
${TBB_INCLUDE_DIRS}
diff --git a/pxr/imaging/hdSt/CMakeLists.txt b/pxr/imaging/hdSt/CMakeLists.txt
index f3fa70074..886e42401 100644
--- a/pxr/imaging/hdSt/CMakeLists.txt
+++ b/pxr/imaging/hdSt/CMakeLists.txt
@@ -46,7 +46,7 @@ pxr_library(hdSt
sdr
tf
trace
- ${TBB_tbb_LIBRARY}
+ TBB::tbb
${OPENSUBDIV_LIBRARIES}
${optionalLibs}
diff --git a/pxr/imaging/plugin/hdEmbree/CMakeLists.txt b/pxr/imaging/plugin/hdEmbree/CMakeLists.txt
index 43aa0826e..9f6cb6b8e 100644
--- a/pxr/imaging/plugin/hdEmbree/CMakeLists.txt
+++ b/pxr/imaging/plugin/hdEmbree/CMakeLists.txt
@@ -21,7 +21,7 @@ pxr_plugin(hdEmbree
hf
hd
hdx
- ${TBB_tbb_LIBRARY}
+ TBB::tbb
${EMBREE_LIBRARY}
INCLUDE_DIRS
diff --git a/pxr/imaging/plugin/hdStorm/CMakeLists.txt b/pxr/imaging/plugin/hdStorm/CMakeLists.txt
index 043f2d363..8182ae385 100644
--- a/pxr/imaging/plugin/hdStorm/CMakeLists.txt
+++ b/pxr/imaging/plugin/hdStorm/CMakeLists.txt
@@ -26,7 +26,7 @@ pxr_plugin(hdStorm
hd
hdSt
${OPENSUBDIV_LIBRARIES}
- ${TBB_tbb_LIBRARY}
+ TBB::tbb
INCLUDE_DIRS
${TBB_INCLUDE_DIRS}
diff --git a/pxr/usd/ar/CMakeLists.txt b/pxr/usd/ar/CMakeLists.txt
index bd77e0e31..a4fea8042 100644
--- a/pxr/usd/ar/CMakeLists.txt
+++ b/pxr/usd/ar/CMakeLists.txt
@@ -8,7 +8,7 @@ pxr_library(ar
tf
plug
vt
- ${TBB_tbb_LIBRARY}
+ TBB::tbb
INCLUDE_DIRS
${TBB_INCLUDE_DIRS}
diff --git a/pxr/usd/pcp/CMakeLists.txt b/pxr/usd/pcp/CMakeLists.txt
index a1feb53af..5d1bbc552 100644
--- a/pxr/usd/pcp/CMakeLists.txt
+++ b/pxr/usd/pcp/CMakeLists.txt
@@ -9,7 +9,7 @@ pxr_library(pcp
sdf
work
ar
- ${TBB_tbb_LIBRARY}
+ TBB::tbb
INCLUDE_DIRS
${TBB_INCLUDE_DIRS}
diff --git a/pxr/usd/sdf/CMakeLists.txt b/pxr/usd/sdf/CMakeLists.txt
index 6562d572e..626a72993 100644
--- a/pxr/usd/sdf/CMakeLists.txt
+++ b/pxr/usd/sdf/CMakeLists.txt
@@ -12,7 +12,7 @@ pxr_library(sdf
vt
work
ar
- ${TBB_tbb_LIBRARY}
+ TBB::tbb
INCLUDE_DIRS
${TBB_INCLUDE_DIRS}
diff --git a/pxr/usd/usd/CMakeLists.txt b/pxr/usd/usd/CMakeLists.txt
index 0976d182c..2121de978 100644
--- a/pxr/usd/usd/CMakeLists.txt
+++ b/pxr/usd/usd/CMakeLists.txt
@@ -16,7 +16,7 @@ pxr_library(usd
ts
vt
work
- ${TBB_tbb_LIBRARY}
+ TBB::tbb
INCLUDE_DIRS
${TBB_INCLUDE_DIRS}
diff --git a/pxr/usd/usdGeom/CMakeLists.txt b/pxr/usd/usdGeom/CMakeLists.txt
index f132786e6..8fec1d0ca 100644
--- a/pxr/usd/usdGeom/CMakeLists.txt
+++ b/pxr/usd/usdGeom/CMakeLists.txt
@@ -13,7 +13,7 @@ pxr_library(usdGeom
trace
usd
work
- ${TBB_tbb_LIBRARY}
+ TBB::tbb
INCLUDE_DIRS
${TBB_INCLUDE_DIRS}
diff --git a/pxr/usd/usdPhysics/CMakeLists.txt b/pxr/usd/usdPhysics/CMakeLists.txt
index 7e1ea02d5..2bb65bd2c 100644
--- a/pxr/usd/usdPhysics/CMakeLists.txt
+++ b/pxr/usd/usdPhysics/CMakeLists.txt
@@ -14,7 +14,7 @@ pxr_library(usdPhysics
usdGeom
usdShade
work
- ${TBB_tbb_LIBRARY}
+ TBB::tbb
INCLUDE_DIRS
${TBB_INCLUDE_DIRS}
diff --git a/pxr/usd/usdShade/CMakeLists.txt b/pxr/usd/usdShade/CMakeLists.txt
index 30200e096..280fd622a 100644
--- a/pxr/usd/usdShade/CMakeLists.txt
+++ b/pxr/usd/usdShade/CMakeLists.txt
@@ -12,7 +12,7 @@ pxr_library(usdShade
sdr
usd
usdGeom
- ${TBB_tbb_LIBRARY}
+ TBB::tbb
INCLUDE_DIRS
${TBB_INCLUDE_DIRS}
diff --git a/pxr/usd/usdSkel/CMakeLists.txt b/pxr/usd/usdSkel/CMakeLists.txt
index 45ea62854..056545cc5 100644
--- a/pxr/usd/usdSkel/CMakeLists.txt
+++ b/pxr/usd/usdSkel/CMakeLists.txt
@@ -14,7 +14,7 @@ pxr_library(usdSkel
sdf
usd
usdGeom
- ${TBB_tbb_LIBRARY}
+ TBB::tbb
INCLUDE_DIRS
${TBB_INCLUDE_DIRS}
diff --git a/pxr/usd/usdUtils/CMakeLists.txt b/pxr/usd/usdUtils/CMakeLists.txt
index 79b9b8ee2..04d34425c 100644
--- a/pxr/usd/usdUtils/CMakeLists.txt
+++ b/pxr/usd/usdUtils/CMakeLists.txt
@@ -10,7 +10,7 @@ pxr_library(usdUtils
usd
usdGeom
usdShade
- ${TBB_tbb_LIBRARY}
+ TBB::tbb
INCLUDE_DIRS
${TBB_INCLUDE_DIRS}
diff --git a/pxr/usdImaging/usdImaging/CMakeLists.txt b/pxr/usdImaging/usdImaging/CMakeLists.txt
index 1319d3353..a9849161a 100644
--- a/pxr/usdImaging/usdImaging/CMakeLists.txt
+++ b/pxr/usdImaging/usdImaging/CMakeLists.txt
@@ -22,7 +22,7 @@ pxr_library(usdImaging
usdShade
usdVol
ar
- ${TBB_tbb_LIBRARY}
+ TBB::tbb
INCLUDE_DIRS
${TBB_INCLUDE_DIRS}
diff --git a/pxr/usdImaging/usdImagingGL/CMakeLists.txt b/pxr/usdImaging/usdImagingGL/CMakeLists.txt
index ae4c7004f..fefd1cc98 100644
--- a/pxr/usdImaging/usdImagingGL/CMakeLists.txt
+++ b/pxr/usdImaging/usdImagingGL/CMakeLists.txt
@@ -31,7 +31,7 @@ pxr_library(usdImagingGL
usdShade
usdImaging
ar
- ${TBB_tbb_LIBRARY}
+ TBB::tbb
INCLUDE_DIRS
${TBB_INCLUDE_DIRS}
diff --git a/pxr/usdImaging/usdRiPxrImaging/CMakeLists.txt b/pxr/usdImaging/usdRiPxrImaging/CMakeLists.txt
index 2b978360d..11ad2f7bf 100644
--- a/pxr/usdImaging/usdRiPxrImaging/CMakeLists.txt
+++ b/pxr/usdImaging/usdRiPxrImaging/CMakeLists.txt
@@ -19,7 +19,7 @@ pxr_library(usdRiPxrImaging
usdImaging
usdVol
ar
- ${TBB_tbb_LIBRARY}
+ TBB::tbb
INCLUDE_DIRS
${TBB_INCLUDE_DIRS}
diff --git a/pxr/usdValidation/usdValidation/CMakeLists.txt b/pxr/usdValidation/usdValidation/CMakeLists.txt
index 9f2988111..935ebbb1f 100644
--- a/pxr/usdValidation/usdValidation/CMakeLists.txt
+++ b/pxr/usdValidation/usdValidation/CMakeLists.txt
@@ -9,7 +9,7 @@ pxr_library(usdValidation
gf
usd
work
- ${TBB_tbb_LIBRARY}
+ TBB::tbb
INCLUDE_DIRS
${TBB_INCLUDE_DIRS}