CMAKE error on Qt5Core
The problem
I’m trying to build a source code using QT5 using CMake. It exits this error:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
CMake Error at CMakeLists.txt:20 (find_package):
code>
By not providing "FindQt5Core.cmake" in CMAKE_MODULE_PATH this project has
code>
asked CMake to find a package configuration file provided by "Qt5Core", but
code>
CMake did not find one.
code>
Could not find a package configuration file provided by "Qt5Core" with any
code>
of the following names:
code>
Qt5CoreConfig.cmake
code>
qt5core-config.cmake
code>
Add the installation prefix of "Qt5Core" to CMAKE_PREFIX_PATH or set
code>
"Qt5Core_DIR" to a directory containing one of the above files. If
code>
"Qt5Core" provides a separate development package or SDK, be sure it has
code>
been installed.
|
solution
I checked the QT5 package and it seems to be installed. The naming of the QT4 and QT5 packages in Ubuntu has been changed and dropped.
All you need is wrapping qtbase5-dev
Once I installed it, this bug was resolved:
1
|
$ sudo apt install qtbase5-dev
|