Allow building without QT gamepad module (#331)

This commit is contained in:
Tomasz Goliński 2019-03-16 23:49:30 +01:00 committed by Leonardo Zide
parent c1c9998511
commit e07b9d7ec6
2 changed files with 4 additions and 3 deletions

View file

@ -24,8 +24,6 @@
#include "lc_colors.h"
#include <functional>
#define LC_ENABLE_GAMEPAD (QT_VERSION >= QT_VERSION_CHECK(5, 12, 0))
#if LC_ENABLE_GAMEPAD
#include <QtGamepad/QGamepad>
#endif

View file

@ -8,7 +8,10 @@ greaterThan(QT_MAJOR_VERSION, 4) {
equals(QT_MAJOR_VERSION, 5) {
greaterThan(QT_MINOR_VERSION, 11) {
qtHaveModule(gamepad) {
QT += gamepad
DEFINES += LC_ENABLE_GAMEPAD
}
}
}