Qt5Core上的CMake错误

来源:互联网 发布:c语言中如何打开文件 编辑:程序博客网 时间:2024/06/03 19:11

Qt5Core上的CMake错误

问题

我试图使用CMake构建使用Qt5的源代码它退出了这个错误:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
CMake Error at CMakeLists.txt:20 (find_package):
  By not providing "FindQt5Core.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "Qt5Core", but
  CMake did not find one.
 
  Could not find a package configuration file provided by "Qt5Core" with any
  of the following names:
 
    Qt5CoreConfig.cmake
    qt5core-config.cmake
 
  Add the installation prefix of "Qt5Core" to CMAKE_PREFIX_PATH or set
  "Qt5Core_DIR" to a directory containing one of the above files.  If
  "Qt5Core" provides a separate development package or SDK, be sure it has
  been installed.

我检查了Qt5包,似乎安装了。Ubuntu中的Qt4和Qt5软件包之间的命名有所改变,并将其抛弃。

需要的是包装qtbase5-dev一旦我安装它,这个错误解决了:

1
$ sudo apt install qtbase5-dev
0 0
原创粉丝点击