probonopd / linuxdeployqt

Makes Linux applications self-contained by copying in the libraries and plugins that the application uses, and optionally generates an AppImage. Can be used for Qt and other applications
Other
2.22k stars 414 forks source link

Fix build with Qt6 #613

Closed dfaure-kdab closed 4 months ago

dfaure-kdab commented 4 months ago

find_package(QT ...) only finds out if Qt5 or Qt6 is available. One needs to then to find_package(Qt5...) or find_package(Qt6...) as in the Qt documentation: https://doc.qt.io/qt-6/cmake-qt5-and-qt6-compatibility.html

Otherwise, one gets this error: CMake Error: AUTOMOC for target linuxdeployqt: Could not find moc executable target Qt6::moc CMake Generate step failed. Build files cannot be regenerated correctly.

probonopd commented 4 months ago

Thank you very much @dfaure-kdab. Merged.

(Now that I have your attention, if it is not too much to ask could you maybe help me a bit on a QListView issue which after a lot of experimentation I suspect is a long-standing bug in Qt 5 and 6? (Video demo at the end of the linked issue.) Or would you recommend something else than a QListView if my objective is to make an icon view for a file manager in which the icons can be freely positioned and the icon coordinates are persisted?)