【发布时间】:2022-01-02 16:50:37
【问题描述】:
我正在尝试使用 CMake 3.17.5 构建 3d 方应用程序。
我已通过 vcpkg(在 Windows 上)安装了 boost。我检查了我已经通过 vcpkg 安装了 boost-python。
我在 CMake GUI 中收到以下错误:
CMake Error at C:/Program Files (x86)/CMake/share/cmake-3.17/Modules/FindPackageHandleStandardArgs.cmake:164 (message):
Could NOT find Boost (missing: python) (found version "1.75.0")
Call Stack (most recent call first):
C:/Program Files (x86)/CMake/share/cmake-3.17/Modules/FindPackageHandleStandardArgs.cmake:445 (_FPHSA_FAILURE_MESSAGE)
C:/Program Files (x86)/CMake/share/cmake-3.17/Modules/FindBoost.cmake:2166 (find_package_handle_standard_args)
cmake/modules/FindUSDMonolithic.cmake:71 (find_package)
cmake/defaults/Packages.cmake:34 (find_package)
CMakeLists.txt:11 (include)
我尝试将 CMAKE_TOOLCHAIN_FILE 设置为 vcpkg.cmake,但没有成功。
注意:在我将 Boost_INCLUDE_DIR 设置为 vcpkg/installed/x64-windows/include/ 后,CMake 确实找到了提升,但它仍然有这个奇怪的错误。如果不设置这个变量,CMake 根本找不到 boost 并且错误是不同的
【问题讨论】: