1
0
mirror of https://github.com/eclipse/paho.mqtt.cpp.git synced 2025-05-09 19:31:22 +08:00

#275 Keep -static suffix for Paho C on Windows

This commit is contained in:
fpagliughi 2020-12-13 10:51:53 -05:00
parent b7b497d983
commit 6e87712bf4

View File

@ -5,10 +5,13 @@ if(PAHO_WITH_SSL)
else() else()
set(_PAHO_MQTT_C_LIB_NAME paho-mqtt3a) set(_PAHO_MQTT_C_LIB_NAME paho-mqtt3a)
endif() endif()
# add suffix when using static Paho MQTT C library variant
#if(PAHO_BUILD_STATIC) # add suffix when using static Paho MQTT C library variant on Windows
# set(_PAHO_MQTT_C_LIB_NAME ${_PAHO_MQTT_C_LIB_NAME}-static) if(WIN32)
#endif() 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}) find_library(PAHO_MQTT_C_LIBRARIES NAMES ${_PAHO_MQTT_C_LIB_NAME})
unset(_PAHO_MQTT_C_LIB_NAME) unset(_PAHO_MQTT_C_LIB_NAME)