Skip to content

Commit 6e87712

Browse files
committed
eclipse-paho#275 Keep -static suffix for Paho C on Windows
1 parent b7b497d commit 6e87712

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

cmake/FindPahoMqttC.cmake

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,13 @@ if(PAHO_WITH_SSL)
55
else()
66
set(_PAHO_MQTT_C_LIB_NAME paho-mqtt3a)
77
endif()
8-
# add suffix when using static Paho MQTT C library variant
9-
#if(PAHO_BUILD_STATIC)
10-
# set(_PAHO_MQTT_C_LIB_NAME ${_PAHO_MQTT_C_LIB_NAME}-static)
11-
#endif()
8+
9+
# add suffix when using static Paho MQTT C library variant on Windows
10+
if(WIN32)
11+
if(PAHO_BUILD_STATIC)
12+
set(_PAHO_MQTT_C_LIB_NAME ${_PAHO_MQTT_C_LIB_NAME}-static)
13+
endif()
14+
endif()
1215

1316
find_library(PAHO_MQTT_C_LIBRARIES NAMES ${_PAHO_MQTT_C_LIB_NAME})
1417
unset(_PAHO_MQTT_C_LIB_NAME)

0 commit comments

Comments
 (0)