Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix build with Qt6 #613

Merged

Conversation

dfaure-kdab
Copy link
Contributor

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.

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 probonopd merged commit 7f0b8f3 into probonopd:master Jul 8, 2024
1 check passed
@probonopd
Copy link
Owner

probonopd commented Jul 8, 2024

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?)

omergoktas pushed a commit to omergoktas/linuxdeployqt that referenced this pull request Oct 12, 2024
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.

Co-authored-by: David Faure <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants