1
0
mirror of https://github.com/eclipse/paho.mqtt.cpp.git synced 2025-05-10 03:39:07 +08:00

Merge pull request #350 from koalo/master

avoid adding Paho MQTT C library twice
This commit is contained in:
Frank Pagliughi 2023-07-29 16:31:01 -04:00 committed by GitHub
commit 62868ec250
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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}"