You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/app-misc/OpenRGB/files/OpenRGB-0.2-use-system-hida...

58 lines
3.0 KiB

diff --git a/OpenRGB.pro b/OpenRGB.pro
index 91e0079..306085b 100644
--- a/OpenRGB.pro
+++ b/OpenRGB.pro
@@ -23,7 +23,6 @@ RC_ICONS = qt/OpenRGB.ico
INCLUDEPATH += \
dependencies/ColorWheel \
- dependencies/hidapi \
dependencies/libe131/src/ \
i2c_smbus/ \
i2c_tools/ \
@@ -64,7 +63,6 @@ INCLUDEPATH += \
SOURCES += \
dependencies/ColorWheel/ColorWheel.cpp \
- dependencies/hidapi/hidapi.c \
dependencies/libe131/src/e131.c \
main.cpp \
cli.cpp \
@@ -288,6 +286,7 @@ FORMS += \
# Windows specific project configuration
#-----------------------------------------------
win32:INCLUDEPATH += \
+ dependencies/hidapi \
dependencies/inpout32_1501/Win32/ \
dependencies/libusb-1.0.22/include \
dependencies/NVFC \
@@ -295,6 +294,7 @@ win32:INCLUDEPATH += \
wmi/ \
win32:SOURCES += \
+ dependencies/hidapi/hidapi.c \
dependencies/NVFC/nvapi.cpp \
i2c_smbus/i2c_smbus_i801.cpp \
i2c_smbus/i2c_smbus_nct6775.cpp \
@@ -369,6 +369,20 @@ unix:LIBS += \
-lusb-1.0 \
-lstdc++fs \
+ #-------------------------------------------------------------------#
+ # Determine which hidapi to use based on availability #
+ #-------------------------------------------------------------------#
+ packagesExist(hidapi-libusb) {
+ LIBS += -lhidapi-libusb
+ } else {
+ packagesExist(hidapi) {
+ LIBS += -lhidapi
+ } else {
+ LIBS += -lhidapi-libusb
+ }
+ }
+
+
unix:SOURCES += \
i2c_smbus/i2c_smbus_linux.cpp \
serial_port/find_usb_serial_port_linux.cpp \