Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/qt/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Qt 如何使cmake查找包配置文件_Qt_Cmake_Pyside - Fatal编程技术网

Qt 如何使cmake查找包配置文件

Qt 如何使cmake查找包配置文件,qt,cmake,pyside,Qt,Cmake,Pyside,我正在做一个项目 find_package(Shiboken REQUIRED) cmake抱怨 CMake Error at CMakeLists.txt:5 (find_package): By not providing "FindShiboken.cmake" in CMAKE_MODULE_PATH this project has asked CMake to find a package configuration file provided by "Shiboken",

我正在做一个项目

find_package(Shiboken REQUIRED)
cmake抱怨

CMake Error at CMakeLists.txt:5 (find_package):
  By not providing "FindShiboken.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "Shiboken",
  but CMake did not find one.

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

    ShibokenConfig.cmake
    shiboken-config.cmake

  Add the installation prefix of "Shiboken" to CMAKE_PREFIX_PATH or set
  "Shiboken_DIR" to a directory containing one of the above files.  If
  "Shiboken" provides a separate development package or SDK, be sure it has
  been installed.
我确实已将Shiboken编译并安装到C:\Program Files\Shiboken。我可以看到C:\Program files\shiboken\lib\cmake\shiboken-1.1.2文件夹下有像ShibokenConfig.cmake、ShibokenConfig-python2.7.cmake、ShibokenConfigVersion.cmake这样的cmake文件


我如何让cmake知道它应该在该文件夹中搜索ShibokenConfig.cmake?

Shiboken的一位贡献者通过电子邮件回答了我的问题,我确认它正在工作

解决方案:

cmake .. -G"MinGW Makefiles" -DShiboken_DIR=C:\shiboken\lib\cmake\Shiboken-1.1.2
注意:我将C:\Program Files\shiboken复制到C:\shiboken,因为cmake抱怨“C:\Program Files”(可能是因为其中的空格)