-
Bug
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
6.9.2, 6.10.0 RC
-
None
When qt-cmake-create is used to convert a legacy qmake .pro project to a CMake project, it displays some next-steps instructions to the user on completion. (This message is supplied by the QtInitProject.cmake file in the cmake/Qt6/ directory, which qt-cmake-create merely executes.)
An example:
$ cd /tmp $ cp -R $HOME/Qt/Examples/Qt-5.15.2/gui/openglwindow . $ cd openglwindow $ $HOME/Qt/6.10.0/gcc_64/bin/qt-cmake-create The project file is successfully generated. To build the project run: mkdir build cd build qt-cmake /tmp/openglwindow cmake --build /tmp/openglwindow $ mkdir build; cd build $ $HOME/Qt/6.10.0/gcc_64/bin/qt-cmake /tmp/openglwindow -- The CXX compiler identification is GNU 15.2.1 -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Check for working CXX compiler: /usr/lib64/ccache/c++ - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done -- Performing Test CMAKE_HAVE_LIBC_PTHREAD -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success -- Found Threads: TRUE -- Performing Test HAVE_STDATOMIC -- Performing Test HAVE_STDATOMIC - Success -- Found WrapAtomic: TRUE -- Configuring done (0.9s) -- Generating done (0.0s) -- Build files have been written to: /tmp/openglwindow/build $ cmake --build /tmp/openglwindow Error: could not load cache
The argument to 'cmake --build' needs to be a build directory, a location with a CMakeCache.txt file in it, not a source directory. In the case of the instructions provided, the build directory is the current directory, so a simple 'cmake --build' with no path argument would be appropriate.