Qt6 - cmake
-
Ok, which Qt 6 release did you install exactly ?
-
The plot thickens...
I just switched to my linux machine and name issue
find_package(Qt5Core)Mac -
I had removed Qt and did a fresh install.
Newest Qt 6.0Linux -
Have Qt 5.12. and and 15.5.0
Ran the maintenance tool, updated all existing
Reran - installed Qt 6.0
Same issues on the linux box -
@rootshell said in Qt6 - cmake:
CMakeLists.txt
Can you share your CMakeLists.txt file?
Are you sure you point to the correct source directory in the cmake command? -
I just tested using
cmake -DCMAKE_PREFIX_PATH=~/Qt/6.0.0/gcc_64/lib/cmake ..
using one of Qt's example copied in a random folder and it worked properly nothing searched from Qt 5. -
@SGaist - I am having a very similar issue. Trying to port Qt5 to Qt6. on ubuntu 22.04.
I had previously installed Qt5 packages with apt install - I removed all of those with apt remove. I installed Qt6.7.2 with the online installer into directory ~/Qt6. Now cmake find_package() succeeds when I set CMAKE_PREFIX_PATH to ~/Qt6/6.7.2/gcc_64/lib/cmake/:find_package( Qt6 COMPONENTS Gui Widgets Quick REQUIRED)
But cmake fails on the target with:
CMake Warning (dev) in src/qt-test2/CMakeLists.txt: AUTOGEN: No valid Qt version found for target qt-test. AUTOMOC, AUTOUIC and AUTORCC disabled. Consider adding: find_package(Qt5 COMPONENTS Widgets) to your CMakeLists.txt file.
What am I doing wrong?
-
-
@Christian-Ehrlicher - Not intending to hijack anything - this thread is very relevant to my current issue.