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

Bug/Search for Qt6 then Qt5 before building #355

Merged
merged 2 commits into from
Jan 6, 2024

Conversation

lgtmak
Copy link
Contributor

@lgtmak lgtmak commented Dec 22, 2023

There is a bug with find_package in which the ordering is not respected on Linux:

Linux Bug

This makes the qsk_setup_Qt macro always load Qt5 (as opposed to suggested practices).

This will check for the Qt6 first then fallback to Qt5 if not found, thus replicating the best practice behavior.

To target a specific version pass QSK_QT_VERSION to the cmake build command:

$ cmake -DQSK_QT_VERSION=Qt5 ../ && make

Documentation to be added in #351

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@lgtmak
Copy link
Contributor Author

lgtmak commented Dec 22, 2023

Perhaps this is not the best approach and we should instead build the library for both Qt5 and Qt6?

Such as providing build time checks for packages or cmake vars then building targets as QSkinny::QSkinny6 and QSkinny::QSkinny5

@lgtmak
Copy link
Contributor Author

lgtmak commented Dec 28, 2023

There is also two CMAKE vars that could be used instead:

CMAKE_FIND_PACKAGE_SORT_ORDER=NAME

CMAKE_FIND_PACKAGE_SORT_DIRECTION=DEC

@lgtmak
Copy link
Contributor Author

lgtmak commented Dec 28, 2023

I decided on a hybrid approach, ready for review and merge.

@lgtmak lgtmak force-pushed the bug/cmake_find_package branch from b044f37 to 3c77011 Compare December 28, 2023 21:47
@lgtmak lgtmak force-pushed the bug/cmake_find_package branch from 3c77011 to 8149094 Compare December 28, 2023 21:54
@uwerat uwerat merged commit 04afd5e into uwerat:master Jan 6, 2024
10 of 11 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.

4 participants