cmake: Search for private modules with Qt 6.10#758
Conversation
d53b324 to
0c9c248
Compare
4ab2d31 to
1b8501b
Compare
guihkx
left a comment
There was a problem hiding this comment.
Thank you for working on this.
I think we can simplify these changes a bit...
Instead of 3 separate if statements, you could probably write it like this:
# https://doc.qt.io/qt-6/whatsnew610.html#build-system-changes
if(QT_VERSION VERSION_GREATER_EQUAL 6.10)
list(APPEND QT_COMPONENTS CorePrivate GuiPrivate WidgetsPrivate)
endif()This would have to go before the call to find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS ${QT_COMPONENTS}).
This is how it was originally when I approved, not sure why it was changed 🤔 |
|
Ah, I see... Commit 0c9c248 had the changes I suggested, but it doesn't work with Qt 6.10 because it's not in the right place: The If we move the "if" statement just one line above |
Usage of a private Qt module `Foo` requires a call to `find_package(Qt6 COMPONENTS FooPrivate)` since Qt 6.10.
1b8501b to
1585918
Compare
Thanks for your suggestion :) |
|
@Integral-Tech Thanks! @zjeffer Can you add this as a patch to the |
|
Thanks to all involved! @Integral-Tech @guihkx @zjeffer ! |
According to What's New in Qt 6.10:
Otherwise, the build complains about: