From: Ahmad Khalifa <ahmad@khalifa.ws>
Date: Sat, 28 Dec 2024 14:12:45 +0000
Forwarded: not-needed
Subject: Use External Libraries

Remove bundled dependencies and refer to their external versions

---
 Controllers/StreamDeckController/RGBController_ElgatoStreamDeck.cpp |    2 
 OpenRGB.pro                                                         |   49 ----------
 2 files changed, 4 insertions(+), 47 deletions(-)

--- a/OpenRGB.pro
+++ b/OpenRGB.pro
@@ -144,10 +144,7 @@
     $$GUI_INCLUDES                                                                              \
     dependencies/ColorWheel                                                                     \
     dependencies/CRCpp/                                                                         \
-    dependencies/hueplusplus-1.2.0/include                                                      \
-    dependencies/hueplusplus-1.2.0/include/hueplusplus                                          \
     dependencies/httplib                                                                        \
-    dependencies/json/                                                                          \
     dependencies/mdns                                                                           \
     dmiinfo/                                                                                    \
     hidapi_wrapper/                                                                             \
@@ -165,14 +162,12 @@
     qt/                                                                                         \
     SPDAccessor/                                                                                \
     SuspendResume/                                                                              \
-    dependencies/stb/
 
 HEADERS +=                                                                                      \
     $$GUI_H                                                                                     \
     $$CONTROLLER_H                                                                              \
     Colors.h                                                                                    \
     dependencies/ColorWheel/ColorWheel.h                                                        \
-    dependencies/json/nlohmann/json.hpp                                                         \
     LogManager.h                                                                                \
     NetworkClient.h                                                                             \
     NetworkProtocol.h                                                                           \
@@ -213,35 +208,6 @@
     $$GUI_CPP                                                                                   \
     $$CONTROLLER_CPP                                                                            \
     dependencies/ColorWheel/ColorWheel.cpp                                                      \
-    dependencies/hueplusplus-1.2.0/src/Action.cpp                                               \
-    dependencies/hueplusplus-1.2.0/src/APICache.cpp                                             \
-    dependencies/hueplusplus-1.2.0/src/BaseDevice.cpp                                           \
-    dependencies/hueplusplus-1.2.0/src/BaseHttpHandler.cpp                                      \
-    dependencies/hueplusplus-1.2.0/src/Bridge.cpp                                               \
-    dependencies/hueplusplus-1.2.0/src/BridgeConfig.cpp                                         \
-    dependencies/hueplusplus-1.2.0/src/CLIPSensors.cpp                                          \
-    dependencies/hueplusplus-1.2.0/src/ColorUnits.cpp                                           \
-    dependencies/hueplusplus-1.2.0/src/EntertainmentMode.cpp                                    \
-    dependencies/hueplusplus-1.2.0/src/ExtendedColorHueStrategy.cpp                             \
-    dependencies/hueplusplus-1.2.0/src/ExtendedColorTemperatureStrategy.cpp                     \
-    dependencies/hueplusplus-1.2.0/src/Group.cpp                                                \
-    dependencies/hueplusplus-1.2.0/src/HueCommandAPI.cpp                                        \
-    dependencies/hueplusplus-1.2.0/src/HueDeviceTypes.cpp                                       \
-    dependencies/hueplusplus-1.2.0/src/HueException.cpp                                         \
-    dependencies/hueplusplus-1.2.0/src/Light.cpp                                                \
-    dependencies/hueplusplus-1.2.0/src/ModelPictures.cpp                                        \
-    dependencies/hueplusplus-1.2.0/src/NewDeviceList.cpp                                        \
-    dependencies/hueplusplus-1.2.0/src/Scene.cpp                                                \
-    dependencies/hueplusplus-1.2.0/src/Schedule.cpp                                             \
-    dependencies/hueplusplus-1.2.0/src/Sensor.cpp                                               \
-    dependencies/hueplusplus-1.2.0/src/SimpleBrightnessStrategy.cpp                             \
-    dependencies/hueplusplus-1.2.0/src/SimpleColorHueStrategy.cpp                               \
-    dependencies/hueplusplus-1.2.0/src/SimpleColorTemperatureStrategy.cpp                       \
-    dependencies/hueplusplus-1.2.0/src/StateTransaction.cpp                                     \
-    dependencies/hueplusplus-1.2.0/src/TimePattern.cpp                                          \
-    dependencies/hueplusplus-1.2.0/src/UPnP.cpp                                                 \
-    dependencies/hueplusplus-1.2.0/src/Utils.cpp                                                \
-    dependencies/hueplusplus-1.2.0/src/ZLLSensors.cpp                                           \
     startup/startup.cpp                                                                         \
     cli.cpp                                                                                     \
     dmiinfo/dmiinfo.cpp                                                                         \
@@ -280,21 +246,11 @@
 # General configuration to decide if in-tree dependencies are used or not
 #-----------------------------------------------------------------------------------------------#
 
-!system_libe131:SOURCES += dependencies/libe131/src/e131.c
-!system_libe131:INCLUDEPATH += dependencies/libe131/src/
-
 #-----------------------------------------------------------------------------------------------#
 # General configuration out-of-tree dependencies if in-tree are not used for systems
 # who use pkg-config i.e. Unix-like. Also includes macOS as Homebrew uses pkg-config too.
 #-----------------------------------------------------------------------------------------------#
 
-unix {
-    system_libe131 {
-        CONFIG += link_pkgconfig
-        PKGCONFIG += libe131
-    }
-}
-
 #-----------------------------------------------------------------------------------------------#
 # Translations                                                                                  #
 #   NB: Translation files should not be added dynamically due to the process                    #
@@ -480,6 +436,7 @@
     dependencies/NVFC                                                                           \
     i2c_smbus/Linux                                                                             \
     /usr/include/mbedtls/                                                                       \
+    /usr/include/stb/
 
     LIBS +=                                                                                     \
     -L/usr/lib/mbedtls/                                                                         \
@@ -487,6 +444,8 @@
     -lmbedtls                                                                                   \
     -lmbedcrypto                                                                                \
     -ldl                                                                                        \
+    -lhueplusplus                                                                               \
+    -le131                                                                                      \
 
     COMPILER_VERSION = $$system($$QMAKE_CXX " -dumpversion")
     if (!versionAtLeast(COMPILER_VERSION, "9")) {
@@ -523,7 +482,6 @@
     SOURCES += $$CONTROLLER_CPP_LINUX
 
     SOURCES +=                                                                                  \
-    dependencies/hueplusplus-1.2.0/src/LinHttpHandler.cpp                                       \
     dependencies/NVFC/nvapi.cpp                                                                 \
     i2c_smbus/Linux/i2c_smbus_linux.cpp                                                         \
     scsiapi/scsiapi_linux.c                                                                     \
