came across the following error while converting qmake project to cmake ,please anyone can help?
-
CMake Error at CMakeLists.txt:14 (find_package):
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.-- Configuring incomplete, errors occurred!
-
@selvam Are you getting this in some IDE like Qt Creator or when building from command line?
Looks like cmake can't find Qt. If you are building from terminal, you need to add this to point cmake in the right direction:
cmake -DCMAKE_PREFIX_PATH=/path/to/qt/5.15.2/lib/cmake [other flags you are using....]