Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CMake configure fails to find Qt5 on Linux

Tags:

c++

linux

cmake

qt

I'm running in visual studio code the following message occurs when building cmake

By not providing "FindQt5.cmake" in CMAKE_MODULE_PATH this project has asked CMake to find a package configuration file provided by "Qt5", but CMake did not find one.

Could not find a package configuration file provided by "Qt5" with any of the following names:

Qt5Config.cmake
qt5-config.cmake

Add the installation prefix of "Qt5" to CMAKE_PREFIX_PATH or set "Qt5_DIR" to a directory containing one of the above files. If "Qt5" provides a separate development package or SDK, be sure it has been installed.

enter image description here enter image description here

like image 299
MarcosApps Avatar asked Oct 28 '22 03:10

MarcosApps


1 Answers

sudo apt-get install qtbase5-dev
sudo apt-get install qtdeclarative5-dev

I installed the 2 gt package and added the add prefix of "Qt5" to CMAKE_PREFIX_PATH or set "Qt5_DIR" to a directory containing one of the above files. mentioned in comment above @drescherjm

cmake build normally

like image 105
MarcosApps Avatar answered Nov 07 '22 18:11

MarcosApps