CMake:如何修复 Ubuntu 上 Could not find a package configuration file provided by "TBB" 错误
问题
使用 CMake 编译 C/C++ 项目时,你看到以下错误消息:
cmake_tbb_error_output.txt
CMake Error at CMakeLists.txt:25 (find_package):
By not providing "FindTBB.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "TBB", but
CMake did not find one.
Could not find a package configuration file provided by "TBB" with any of
the following names:
TBBConfig.cmake
tbb-config.cmake
Add the installation prefix of "TBB" to CMAKE_PREFIX_PATH or set "TBB_DIR"
to a directory containing one of the above files. If "TBB" provides a
separate development package or SDK, be sure it has been installed.解决方案
使用以下命令安装 libtbb-dev:
install_libtbb.sh
sudo apt -y install libtbb-devIf this post helped you, please consider buying me a coffee or donating via PayPal to support research & publishing of new posts on TechOverflow