Cmake error on qt5core

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):


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.

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


Read More: