Conversation
CMake/ctkMacroBuildPlugin.cmake
Outdated
There was a problem hiding this comment.
Here you've switch from Qt5::Test to Qt::Test. This versionless target support would only be possible with Qt 5.15 and Qt 6+.
Re https://doc.qt.io/qt-6/cmake-qt5-and-qt6-compatibility.html#versionless-targets
set(QT_NO_CREATE_VERSIONLESS_FUNCTIONS ON) # Versionless functions requires Qt 5.15 and newer
set(QT_NO_CREATE_VERSIONLESS_TARGETS ON) # Versionless targets requires Qt 5.15 and newer
Re https://doc.qt.io/qt-6/cmake-qt5-and-qt6-compatibility.html#supporting-older-qt-5-versions
Following
find_package(QT NAMES Qt6 Qt5 REQUIRED COMPONENTS Core)
find_package(Qt${CTK_QT_VERSION} REQUIRED COMPONENTS Core)
Could you instead utilize Qt${CTK_QT_VERSION}::Test in this case? And then apply the same logic for other targets?
There was a problem hiding this comment.
I didn't know that it was only for qt 5.15+ for the versionless targets. I'll fix them.
There was a problem hiding this comment.
I see you've made some changes with the versioned target, though I still see this specific place in the code and some other places with only a versionless target being used like Qt::
ee465a2 to
4feeab3
Compare
and remove temp files
f5974cc to
2b5bc19
Compare
2b5bc19 to
a4c379f
Compare
|
I don't understand why it fails with Qt5. For now, I'm going to close the PR. |
This is different from #1023 in 2 ways:
is taken from theQt5CoreCompat` rather than being aliased to QRegularExpression, minimizing the changes.Just some additional notes:
I've only tested it for CTKCore and CTKWidgets.
I'm also using Conan to manage the compilation and so not all Qt macros are there.
This is something I'm looking to bring up with the conan maintainers.
I am migrating to Qt6, and so as a first pass, I want to see that the CI will build for older versions as well.