0001-cmake-FindMahoMqttC.cmake-fix-static-build.patch 1.2 KB

1234567891011121314151617181920212223242526272829303132333435
  1. From 8aeafa1c2ec90b0e95ba5944266eda115457e10d Mon Sep 17 00:00:00 2001
  2. From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
  3. Date: Mon, 15 Jun 2020 13:40:22 +0200
  4. Subject: [PATCH] cmake/FindMahoMqttC.cmake: fix static build
  5. Static libraries of paho-mqtt-c are not suffixed with -static since
  6. version 1.3.2 and
  7. https://github.com/eclipse/paho.mqtt.c/commit/8cc51c78b76a1eabd1df3124b0887ce8b01070ff
  8. See: https://github.com/eclipse/paho.mqtt.c/pull/704
  9. Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
  10. [Upstream status: https://github.com/eclipse/paho.mqtt.cpp/pull/275]
  11. ---
  12. cmake/FindPahoMqttC.cmake | 4 ----
  13. 1 file changed, 4 deletions(-)
  14. diff --git a/cmake/FindPahoMqttC.cmake b/cmake/FindPahoMqttC.cmake
  15. index 53f15a3..0ec95bd 100644
  16. --- a/cmake/FindPahoMqttC.cmake
  17. +++ b/cmake/FindPahoMqttC.cmake
  18. @@ -5,10 +5,6 @@ if(PAHO_WITH_SSL)
  19. else()
  20. set(_PAHO_MQTT_C_LIB_NAME paho-mqtt3a)
  21. endif()
  22. -# add suffix when using static Paho MQTT C library variant
  23. -if(PAHO_BUILD_STATIC)
  24. - set(_PAHO_MQTT_C_LIB_NAME ${_PAHO_MQTT_C_LIB_NAME}-static)
  25. -endif()
  26. find_library(PAHO_MQTT_C_LIBRARIES NAMES ${_PAHO_MQTT_C_LIB_NAME})
  27. unset(_PAHO_MQTT_C_LIB_NAME)
  28. --
  29. 2.26.2