[Interest] How to use Qt6::qmake ?
Marius Kittler
mkittler at suse.de
Tue Jan 19 00:22:19 CET 2021
Hi,
Qt's CMake modules should already make most paths available. I came up with
the following approach to support Qt 5 and Qt 6: https://github.com/Martchus/
qtutilities/blob/5960c215586cf0ca777a511c6f0830c1c63ddaa8/cmake/modules/
QtLinkage.cmake#L124
It works at least for QT_INSTALL_TRANSLATIONS. Maybe it needed to be tweaked
for other variables.
This function also shows how to get the location of the qmake binary if you
really need it after all.
I'd also suggest to use the CMake modules Qt provides for using Linguist. This
has already worked with Qt 5 and continues to work with Qt 6. When cross-
compiling you currently need a workaround, though: https://github.com/
Martchus/qtutilities/blob/5960c215586cf0ca777a511c6f0830c1c63ddaa8/cmake/
modules/QtConfig.cmake#L303
More information about the Interest
mailing list