【问题标题】:CMake build error: Qt5PrintSupportConfig.cmake missingCMake 构建错误:缺少 Qt5PrintSupportConfig.cmake
【发布时间】:2017-08-19 15:53:24
【问题描述】:

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

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)

【问题讨论】:

    标签: c++ qt build cmake mitk


    【解决方案1】:

    您下载了错误的 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 文件。

    【讨论】:

      猜你喜欢
      • 2011-05-22
      • 2018-09-03
      • 1970-01-01
      • 2013-04-25
      • 1970-01-01
      • 2012-01-31
      • 1970-01-01
      • 1970-01-01
      • 2020-02-15
      相关资源
      最近更新 更多