Reputation: 101
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!
Upvotes: 8
Views: 25428
Reputation: 1
try adding this to the top of CMakeLists.txt
set(Qt6_DIR F:/Qt6.7/6.7.2/mingw_64/lib/cmake/Qt6/)
Replace the value with your path. Qt6Config.cmake or qt6-config.cmake be under the path.
Upvotes: 0
Reputation: 76
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" .
Upvotes: 5
Reputation: 115
As the error message says, you need up set the environment value Qt6_DIR to the location you installed qt6 to. This should be a part of the instructions in installing qt6.
You should link the instructions you used for installing qt6. They may contain instructions to set the environment variable QT_DIR instead of the Qt6_DIR which is required by what you're building. If this is the case just follow the instructions for setting QT_DIR to also set Qt6_DIR.
Upvotes: 1