mirror of
https://github.com/eclipse/paho.mqtt.cpp.git
synced 2025-05-09 19:31:22 +08:00
Merge pull request #350 from koalo/master
avoid adding Paho MQTT C library twice
This commit is contained in:
commit
62868ec250
@ -17,7 +17,9 @@ find_library(PAHO_MQTT_C_LIBRARIES NAMES ${_PAHO_MQTT_C_LIB_NAME})
|
|||||||
unset(_PAHO_MQTT_C_LIB_NAME)
|
unset(_PAHO_MQTT_C_LIB_NAME)
|
||||||
find_path(PAHO_MQTT_C_INCLUDE_DIRS NAMES MQTTAsync.h)
|
find_path(PAHO_MQTT_C_INCLUDE_DIRS NAMES MQTTAsync.h)
|
||||||
|
|
||||||
add_library(PahoMqttC::PahoMqttC UNKNOWN IMPORTED)
|
if (NOT TARGET PahoMqttC::PahoMqttC)
|
||||||
|
add_library(PahoMqttC::PahoMqttC UNKNOWN IMPORTED)
|
||||||
|
endif ()
|
||||||
|
|
||||||
set_target_properties(PahoMqttC::PahoMqttC PROPERTIES
|
set_target_properties(PahoMqttC::PahoMqttC PROPERTIES
|
||||||
IMPORTED_LOCATION "${PAHO_MQTT_C_LIBRARIES}"
|
IMPORTED_LOCATION "${PAHO_MQTT_C_LIBRARIES}"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user