CMake构建错误:Qt5PrintSupportConfig.cmake缺失

时间:2017-03-27 04:28:14

标签: c++ qt build cmake mitk

我正在尝试使用CMake构建一个名为MITK的C ++工具包。但是我得到了这个Qt5相关的错误。我使用的是Qt 5.7.1的开源版本。我无法在Qt5文件夹中找到名称为Qt5PrintSupportConfig.cmake的任何文件。我发现最接近的是文件夹windowsprintersupport.dll中的printsupport。可能是什么探测器?

CMake Error at C:/Qt5.7.1/5.7/winrt_x64_msvc2015/lib/cmake/Qt5/Qt5Config.cmake:26 (find_package):
Could not find a package configuration file provided by "Qt5PrintSupport" with any of the following names:

    Qt5PrintSupportConfig.cmake
    qt5printsupport-config.cmake

Add the installation prefix of "Qt5PrintSupport" to CMAKE_PREFIX_PATH or
set "Qt5PrintSupport_DIR" to a directory containing one of the above files.

If "Qt5PrintSupport" provides a separate development package or SDK, be sure it has been installed.
Call Stack (most recent call first): CMakeLists.txt:211 (find_package)

1 个答案:

答案 0 :(得分:0)

您下载了错误的Qt在线安装程序。

您安装的是:https://www.qt.io/download/

您想要的是:https://www.qt.io/download-open-source/表示最新版本,或者https://download.qt.io/archive/online_installers/2.0/表示旧版本。

我不确定区别是什么,但您可能安装的是normal版本,而您需要的版本是unified版本,无论这意味着什么。安装后,请检查以下目录:C:\Qt\5.7\msvc2015_64\lib\cmake\Qt5PrintSupport,因为它现在应该包含Qt5PrintSupportConfig.cmake文件。