Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot find Qt6 installation?

Tags:

c++

cmake

qt

qt6

Trying to follow the install instructions from a GitHub page: https://github.com/TASEmulators/fceux

I went through with installing Qt6 and when I do the following this happens:

mkdir build
cd build
cmake  -DCMAKE_INSTALL_PREFIX=/usr  -DQT6=1  -DCMAKE_BUILD_TYPE=Debug    ..

-- Selecting Windows SDK version 10.0.19041.0 to target Windows 10.0.19042.
-- GUI Frontend: Qt6
CMake Error at src/CMakeLists.txt:22 (find_package):
  By not providing "FindQt6.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "Qt6", but
  CMake did not find one.

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

    Qt6Config.cmake
    qt6-config.cmake

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


-- Configuring incomplete, errors occurred!

like image 329
Dugongue Avatar asked May 21 '26 01:05

Dugongue


1 Answers

You can try to define the directory contains the installation of Qt6. Suppose Qt is installed in /home/user/Qt6

cmake -DCMAKE_PREFIX_PATH="/home/user/Qt6/6.4.2/gcc_64/lib/cmake" .
like image 94
Jan Chan Avatar answered May 24 '26 02:05

Jan Chan