mirror of
https://github.com/Skycoder42/QHotkey.git
synced 2026-11-19 12:49:58 +03:00
Add support for Qt6 (#51)
CMake: The 'QT_MAJOR' CMake variable controls which major version of Qt is used for building. Defaults to '5', so nothing changes when using the default 'cmake' invocation, as it will default to search/build for Qt5. qmake: Just build in the usual way with 'qmake6 && make' or 'qmake-qt5 && make'. When building with Qt6 on GNU/Linux and similar UNIXes, the minimium required Qt version is 6.2.0, as Qt 6.1 and 6.0 lacks support for getting the X11 display.
This commit is contained in:
+10
-1
@@ -1,6 +1,15 @@
|
||||
mac: LIBS += -framework Carbon
|
||||
else:win32: LIBS += -luser32
|
||||
else:unix {
|
||||
QT += x11extras
|
||||
equals(QT_MAJOR_VERSION, 6) {
|
||||
lessThan(QT_VERSION, 6.2.0) {
|
||||
error("Qt 6.2.0 or greater is required when using Qt6")
|
||||
}
|
||||
}
|
||||
else {
|
||||
lessThan(QT_MAJOR_VERSION, 6) {
|
||||
QT += x11extras
|
||||
}
|
||||
}
|
||||
LIBS += -lX11
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user