1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
|
# save build-time options
set(PAHO_BUILD_STATIC @PAHO_BUILD_STATIC@)
set(PAHO_BUILD_SHARED @PAHO_BUILD_SHARED@)
set(PAHO_WITH_SSL @PAHO_WITH_SSL@)
set(PAHO_WITH_MQTT_C @PAHO_WITH_MQTT_C@)
include(CMakeFindDependencyMacro)
find_dependency(Threads REQUIRED)
if (NOT PAHO_WITH_MQTT_C)
find_dependency(eclipse-paho-mqtt-c REQUIRED)
endif()
if (PAHO_WITH_SSL)
find_dependency(OpenSSL REQUIRED)
endif()
if(NOT TARGET PahoMqttCpp::paho-mqttpp3-shared AND NOT TARGET PahoMqttCpp::paho-mqttpp3-static)
include("${CMAKE_CURRENT_LIST_DIR}/@package_name@Targets.cmake")
if(TARGET PahoMqttCpp::paho-mqttpp3-shared)
add_library(PahoMqttCpp::paho-mqttpp3 ALIAS PahoMqttCpp::paho-mqttpp3-shared)
else()
add_library(PahoMqttCpp::paho-mqttpp3 ALIAS PahoMqttCpp::paho-mqttpp3-static)
endif()
endif()
|