stdware / qwindowkit

Cross-platform frameless window framework for Qt. Support Windows, macOS, Linux.
Apache License 2.0
490 stars 78 forks source link

Choose between Qt6 and Qt5 #39

Closed razaqq closed 6 months ago

razaqq commented 6 months ago

I have both qt5 and qt6 installed on linux. For me this https://github.com/stdware/qwindowkit/blob/main/src/QWindowKitConfig.cmake.in ends up choosing Qt5, which causes issues down the line when trying to link to it, since the rest of my application is Qt6 > Qt5, basically Qt5 is just a fallback in case Qt6 is not found.

My current fix is to set set(QMSETUP_FIND_QT_ORDER Qt6) manually. Would it be possible to default to Qt6?

Thanks

SineStriker commented 6 months ago

Now Qt6 is written before Qt5, won't Qt6 be selected by default? I think it's the standard way to write find_package(QT ...).

razaqq commented 6 months ago

No, for me it chooses Qt5 > Qt6, which is obviously not what i want

SineStriker commented 6 months ago

I don't think it's a bug, because almost all Qt projects find Qt packages in that way. I suggest that you set QT_DIR or CMAKE_PREFIX_PATH before CMake Configure.