6

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!

Dugongue
  • 81
  • 1
  • 5
  • "I went through with installing Qt6" - How/Where have you installed QT6? Does that installation has the files noted in the error message (`Qt6Config.cmake` or `qt6-config.cmake`)? – Tsyvarev Feb 11 '22 at 19:22

2 Answers2

0

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.

user3328152
  • 95
  • 1
  • 7
  • Sorry I have no idea if Qt6 actually installed correctly. I don't see any reference to a "Qt6Config.cmake" in the installation folder and when I look at the installation log it says stuff like [1572] Warning: No QtAccount credentials found. Please login via the maintenance tool of the SDK. [1572] Warning: No QtAccount credentials found. Please login via the maintenance tool of the SDK. – Dugongue Feb 11 '22 at 19:39
  • Create a qt user on their website and try to install it again I suppose. The usual resulting installation folder is in the C: drive. – user3328152 Feb 11 '22 at 19:52
  • `Qt6_DIR` is _not_ an environment variable, it is a cache variable, and it should _not_ point to the Qt installation root, but to the directory specifically containing one of the mentioned "config.cmake" files. – Alex Reinking Feb 11 '22 at 21:49
  • 4
    So if its not an environment variable where does it go?! – Shayne Oct 16 '22 at 12:18
0

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" .
Jan Chan
  • 26
  • 2