Skip to content

Commit

Permalink
#275 Keep -static suffix for Paho C on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
fpagliughi committed Dec 13, 2020
1 parent b7b497d commit 6e87712
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions cmake/FindPahoMqttC.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,13 @@ if(PAHO_WITH_SSL)
else()
set(_PAHO_MQTT_C_LIB_NAME paho-mqtt3a)
endif()
# add suffix when using static Paho MQTT C library variant
#if(PAHO_BUILD_STATIC)
# set(_PAHO_MQTT_C_LIB_NAME ${_PAHO_MQTT_C_LIB_NAME}-static)
#endif()

# add suffix when using static Paho MQTT C library variant on Windows
if(WIN32)
if(PAHO_BUILD_STATIC)
set(_PAHO_MQTT_C_LIB_NAME ${_PAHO_MQTT_C_LIB_NAME}-static)
endif()
endif()

find_library(PAHO_MQTT_C_LIBRARIES NAMES ${_PAHO_MQTT_C_LIB_NAME})
unset(_PAHO_MQTT_C_LIB_NAME)
Expand Down

0 comments on commit 6e87712

Please sign in to comment.