CMake 编译 minetest 时找不到 GMP 库

问题描述 投票:0回答:0

我试图在 Windows 上编译 Minetest,CMake 抱怨:

CMake Error at C:/vcpkg/scripts/buildsystems/vcpkg.cmake:846 (_find_package):
  By not providing "FindGMP.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "GMP", but
  CMake did not find one.

  Could not find a package configuration file provided by "GMP" with any of
  the following names:

    GMPConfig.cmake
    gmp-config.cmake

  Add the installation prefix of "GMP" to CMAKE_PREFIX_PATH or set "GMP_DIR"
  to a directory containing one of the above files.  If "GMP" provides a
  separate development package or SDK, be sure it has been installed.
Call Stack (most recent call first):
  CMakeLists.txt:293 (find_package)

我不太了解CMake。什么是 CMAKE_PREFIX_PATH?我可以在 CMakeLists.txt 中定义 CMAKE_PREFIX_PATH 吗?

我在网上找到了几个名为 GMPConfig.cmake 的文件,我可以下载它们,将它们放在我的项目中的某个地方(可能在 vckpg 项目目录中的 gmp_x64-windows 目录中吗?

如果我只是在 Windows 上安装 GMP,会不会以某种方式更新某种允许 CMake 找到二进制文件的全局路径变量?

cmake gmp
© www.soinside.com 2019 - 2024. All rights reserved.