AcademySoftwareFoundation / openvdb

OpenVDB - Sparse volume data structure and tools
http://www.openvdb.org/
Apache License 2.0
2.71k stars 660 forks source link

Make find_package(TBB) work with TBBConfig.cmake #1603

Open lordjaxom opened 1 year ago

lordjaxom commented 1 year ago

Building oneTBB generates export configuration files (e.g. TBBConfig.cmake) which can be imported with find_package in CONFIG mode. So it should be possible to build openvdb using the configuration provided by TBB by setting TBB_ROOT and CMAKE_FIND_PACKAGE_PREFER_CONFIG. However, the (standard) configs generated by TBB set TBB_VERSION instead of Tbb_VERSION, so configuring openvdb fails.

This PR makes it possible to use either FindTBB.cmake (find_package in module mode) and TBBConfig.cmake (find_package in config mode).

linux-foundation-easycla[bot] commented 1 year ago

CLA Signed

The committers listed above are authorized under a signed CLA.