File tree Expand file tree Collapse file tree 3 files changed +51
-4
lines changed
Expand file tree Collapse file tree 3 files changed +51
-4
lines changed Original file line number Diff line number Diff line change 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+
6+ Static libraries of paho-mqtt-c are not suffixed with -static since
7+ version 1.3.2 and
8+ https://github.com/eclipse/paho.mqtt.c/commit/8cc51c78b76a1eabd1df3124b0887ce8b01070ff
9+
10+ See: https://github.com/eclipse/paho.mqtt.c/pull/704
11+
12+ Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
13+ [Upstream status: https://github.com/eclipse/paho.mqtt.cpp/pull/275]
14+ ---
15+ cmake/FindPahoMqttC.cmake | 4 ----
16+ 1 file changed, 4 deletions(-)
17+
18+ diff --git a/cmake/FindPahoMqttC.cmake b/cmake/FindPahoMqttC.cmake
19+ index 53f15a3..0ec95bd 100644
20+ --- a/cmake/FindPahoMqttC.cmake
21+ +++ b/cmake/FindPahoMqttC.cmake
22+ @@ -5,10 +5,6 @@ if(PAHO_WITH_SSL)
23+ else()
24+ set(_PAHO_MQTT_C_LIB_NAME paho-mqtt3a)
25+ endif()
26+ - # add suffix when using static Paho MQTT C library variant
27+ - if(PAHO_BUILD_STATIC)
28+ - set(_PAHO_MQTT_C_LIB_NAME ${_PAHO_MQTT_C_LIB_NAME}-static)
29+ - endif()
30+
31+ find_library(PAHO_MQTT_C_LIBRARIES NAMES ${_PAHO_MQTT_C_LIB_NAME})
32+ unset(_PAHO_MQTT_C_LIB_NAME)
33+ - -
34+ 2.26.2
35+
Original file line number Diff line number Diff line change 11config BR2_PACKAGE_PAHO_MQTT_CPP
22 bool "paho-mqtt-cpp"
3- depends on !BR2_STATIC_LIBS # dlopen()
43 depends on BR2_TOOLCHAIN_HAS_THREADS
54 depends on !BR2_TOOLCHAIN_HAS_GCC_BUG_64735 # std::future
65 depends on BR2_INSTALL_LIBSTDCPP
@@ -10,9 +9,8 @@ config BR2_PACKAGE_PAHO_MQTT_CPP
109
1110 https://eclipse.org/paho/clients/cpp/
1211
13- comment "paho-mqtt-cpp needs a toolchain w/ threads, C++, dynamic library support"
14- depends on BR2_STATIC_LIBS || !BR2_TOOLCHAIN_HAS_THREADS || \
15- !BR2_INSTALL_LIBSTDCPP
12+ comment "paho-mqtt-cpp needs a toolchain w/ threads, C++"
13+ depends on !BR2_TOOLCHAIN_HAS_THREADS || !BR2_INSTALL_LIBSTDCPP
1614 depends on !BR2_TOOLCHAIN_HAS_GCC_BUG_64735
1715
1816comment "paho-mqtt-cpp needs a toolchain not affected by GCC bug 64735"
Original file line number Diff line number Diff line change 2222PAHO_MQTT_CPP_CONF_OPTS += -DPAHO_WITH_SSL=FALSE
2323endif
2424
25+ ifeq ($(BR2_SHARED_LIBS ) ,y)
26+ PAHO_MQTT_CPP_CONF_OPTS += \
27+ -DPAHO_BUILD_SHARED=TRUE \
28+ -DPAHO_BUILD_STATIC=FALSE
29+ else ifeq ($(BR2_STATIC_LIBS),y)
30+ PAHO_MQTT_CPP_CONF_OPTS += \
31+ -DPAHO_BUILD_SHARED=FALSE \
32+ -DPAHO_BUILD_STATIC=TRUE
33+ else ifeq ($(BR2_SHARED_STATIC_LIBS),y)
34+ PAHO_MQTT_CPP_CONF_OPTS += \
35+ -DPAHO_BUILD_SHARED=TRUE \
36+ -DPAHO_BUILD_STATIC=TRUE
37+ endif
38+
2539$(eval $(cmake-package))
You can’t perform that action at this time.
0 commit comments