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).
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).