Skip to content

Commit

Permalink
compiles also on Windows now
Browse files Browse the repository at this point in the history
  • Loading branch information
pleiadian authored and pleiadian committed May 1, 2020
1 parent 205a459 commit cdecb19
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 11 deletions.
4 changes: 4 additions & 0 deletions source/qkontrol.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,11 @@ void qkontrolWindow::updateValues()

// qDebug() << DATA_IN.toHex();
}
#ifdef Q_OS_WIN
if((res == 51) && (DATA_IN[0]==char(0x01)))
#else
if((res == 32) && (DATA_IN[0]==char(0x01)))
#endif
{
// if the button values are still the same, no other button has been pushed. Therefore: ignore
if(DATA_IN.left(6) == oldButtonArray)
Expand Down
23 changes: 12 additions & 11 deletions source/qkontrol.pro
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,15 @@ RESOURCES += qkontrol.qrc

RC_ICONS = qkontrol.ico

!macx: LIBS += -lhidapi-libusb -lusb-1.0

macx: LIBS += -L$$PWD/../../../../usr/local/Cellar/hidapi/0.9.0/lib/ -lhidapi -L$$PWD/../../../../usr/local/Cellar/libusb/1.0.22/lib/ -lusb-1.0
macx: INCLUDEPATH += $$PWD/../../../../usr/local/Cellar/hidapi/0.9.0/include/hidapi $$PWD/../../../../usr/local/Cellar/libusb/1.0.22/include/libusb-1.0/
macx: DEPENDPATH += $$PWD/../../../../usr/local/Cellar/hidapi/0.9.0/include/hidapi $$PWD/../../../../usr/local/Cellar/libusb/1.0.22/include/libusb-1.0/
macx: PRE_TARGETDEPS += $$PWD/../../../../usr/local/Cellar/hidapi/0.9.0/lib/libhidapi.a $$PWD/../../../../usr/local/Cellar/libusb/1.0.22/lib/libusb-1.0.a





unix:!macx: LIBS += -lhidapi-libusb -lusb-1.0

macx: LIBS += -L/usr/local/Cellar/hidapi/0.9.0/lib/ -lhidapi -L/usr/local/Cellar/libusb/1.0.22/lib/ -lusb-1.0
macx: INCLUDEPATH += /usr/local/Cellar/hidapi/0.9.0/include/hidapi /usr/local/Cellar/libusb/1.0.22/include/libusb-1.0/
macx: DEPENDPATH += /usr/local/Cellar/hidapi/0.9.0/include/hidapi /usr/local/Cellar/libusb/1.0.22/include/libusb-1.0/
macx: PRE_TARGETDEPS += /usr/local/Cellar/hidapi/0.9.0/lib/libhidapi.a /usr/local/Cellar/libusb/1.0.22/lib/libusb-1.0.a

win32: DEFINES += QXT_STATIC
win32: LIBS += -LC:/msys64/mingw64/lib/ -lhidapi -llibusb-1.0
win32: INCLUDEPATH += C:/msys64/mingw64/include
win32: DEPENDPATH += C:/msys64/mingw64/include
win32: PRE_TARGETDEPS += C:/msys64/mingw64/lib/libhidapi.a C:/msys64/mingw64/lib/libusb-1.0.a

0 comments on commit cdecb19

Please sign in to comment.