Skip to content

Fix build with Qt dev#271

Merged
danvratil merged 1 commit intoqcoro:mainfrom
zzag:work/zzag/qcoro_find_qt-find-private
Mar 17, 2025
Merged

Fix build with Qt dev#271
danvratil merged 1 commit intoqcoro:mainfrom
zzag:work/zzag/qcoro_find_qt-find-private

Conversation

@zzag
Copy link
Contributor

@zzag zzag commented Mar 17, 2025

With Qt dev, private components are no longer implicitly searched for by find_package(), they should be listed explicitly.

Currently, qcoro_find_qt() excludes the private components from find_package() so qcoro fails to build due to "unknown" components such as Qt::QmlPrivate.

@danvratil
Copy link
Collaborator

Thanks for the patch. Looking at the CI, I think we will need to skip the line you removed only conditionally if Qt >= 6.9 (or 6.10? Not sure what the dev is now with 6.9 just around the corner). Would you mind updating the patch, please?

@zzag
Copy link
Contributor Author

zzag commented Mar 17, 2025

Hmm, it looks like we need to put QuickPrivate and QmlPrivate behind a VERSION_GREATER_EQUAL "6.10.0" guard somehow

@zzag
Copy link
Contributor Author

zzag commented Mar 17, 2025

I'll split the find_package() line in two: one for public components, and another for private components. We should know the Qt version after the first find_package()

@zzag zzag force-pushed the work/zzag/qcoro_find_qt-find-private branch from d27437d to de81f86 Compare March 17, 2025 09:00
@zzag
Copy link
Contributor Author

zzag commented Mar 17, 2025

Let's see if this passes CI. Another option would be to add a new option, e.g. PRIVATE_COMPONENTS, instead of partitioning the comopnents like this.

With Qt dev, private components are no longer implicitly searched for by
find_package(), they should be listed explicitly.

Currently, qcoro_find_qt() excludes the private components from
find_package() so qcoro fails to build due to "unknown" components such
as Qt::QmlPrivate.
@zzag zzag force-pushed the work/zzag/qcoro_find_qt-find-private branch from de81f86 to ffbfc77 Compare March 17, 2025 09:10
@danvratil
Copy link
Collaborator

Perfect, thank you!

@danvratil danvratil merged commit 0cfea93 into qcoro:main Mar 17, 2025
42 checks passed
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.

2 participants