diff options
| author | hank121314 <hank121314@gmail.com> | 2020-05-16 07:57:28 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-05-15 16:57:28 -0700 |
| commit | 18b67ef73009374161ddfc0d3c4eb92ab4d0fa16 (patch) | |
| tree | 9e95b12cf0801d117f7ffbc3126a9f728ccaa95c /ports/paho-mqttpp3/fix-dependency.patch | |
| parent | e80570f12077e4ecd3697ca256f8989d90bd3a9d (diff) | |
| download | vcpkg-18b67ef73009374161ddfc0d3c4eb92ab4d0fa16.tar.gz vcpkg-18b67ef73009374161ddfc0d3c4eb92ab4d0fa16.zip | |
[paho-mqttpp3] update to 1.1 (#11327)
* [paho-mqttpp3]:update to 1.1
* [paho-mqttpp3]:update to latest commit
* [paho-mqttpp3]: fix static library build error
* [paho-mqttpp3] (docs): add HomePage to CONTROL and (deprecated): remove include(vcpkg_common_functions) from protfile.cmake
Diffstat (limited to 'ports/paho-mqttpp3/fix-dependency.patch')
| -rw-r--r-- | ports/paho-mqttpp3/fix-dependency.patch | 50 |
1 files changed, 41 insertions, 9 deletions
diff --git a/ports/paho-mqttpp3/fix-dependency.patch b/ports/paho-mqttpp3/fix-dependency.patch index a0dbf445a..a19644d86 100644 --- a/ports/paho-mqttpp3/fix-dependency.patch +++ b/ports/paho-mqttpp3/fix-dependency.patch @@ -10,10 +10,11 @@ index a9f8908..5c98f3f 100644 "${CMAKE_CURRENT_BINARY_DIR}/${package_name}ConfigVersion.cmake" DESTINATION lib/cmake/${package_name}) diff --git a/cmake/PahoMqttCppConfig.cmake.in b/cmake/PahoMqttCppConfig.cmake.in -index e06dc68..df1cfa6 100644 +index aff9472..275655c 100644 --- a/cmake/PahoMqttCppConfig.cmake.in +++ b/cmake/PahoMqttCppConfig.cmake.in -@@ -1,6 +1,6 @@ +@@ -5,7 +5,7 @@ set(PAHO_WITH_SSL @PAHO_WITH_SSL@) + include(CMakeFindDependencyMacro) list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}) -find_dependency(PahoMqttC REQUIRED) @@ -22,7 +23,7 @@ index e06dc68..df1cfa6 100644 include("${CMAKE_CURRENT_LIST_DIR}/@package_name@Targets.cmake") diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt -index bfcf6bb..089e35a 100644 +index 4e9b7c4..bd1e0a5 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -23,7 +23,7 @@ @@ -34,21 +35,52 @@ index bfcf6bb..089e35a 100644 # --- The headers --- -@@ -91,7 +91,7 @@ if(PAHO_BUILD_SHARED) +@@ -76,17 +76,23 @@ target_include_directories(paho-cpp-objs + src + ) + +- + ## --- Build the shared library, if requested --- + + if(PAHO_BUILD_SHARED) ++ ## set PAHO_C_LIB ++ if(PAHO_WITH_SSL) ++ set(_PAHO_MQTT_C_LIB_NAME eclipse-paho-mqtt-c::paho-mqtt3as eclipse-paho-mqtt-c::paho-mqtt3cs) ++ else() ++ set(_PAHO_MQTT_C_LIB_NAME eclipse-paho-mqtt-c::paho-mqtt3a eclipse-paho-mqtt-c::paho-mqtt3c) ++ endif() ++ + ## create the shared library + add_library(paho-mqttpp3 SHARED $<TARGET_OBJECTS:paho-cpp-objs>) + ## add dependencies to the shared library target_link_libraries(paho-mqttpp3 PRIVATE ${LIBS_SYSTEM} -- PUBLIC PahoMqttC::PahoMqttC) -+ PUBLIC eclipse-paho-mqtt-c::paho-mqtt3a eclipse-paho-mqtt-c::paho-mqtt3c eclipse-paho-mqtt-c::paho-mqtt3as eclipse-paho-mqtt-c::paho-mqtt3cs) +- PUBLIC PahoMqttC::PahoMqttC Threads::Threads) ++ PUBLIC ${_PAHO_MQTT_C_LIB_NAME} Threads::Threads) # It would be nice to exort the include paths from the obj lib, but we # get an export error. Perhaps in a future version? -@@ -129,7 +129,7 @@ if(PAHO_BUILD_STATIC) +@@ -118,13 +124,21 @@ endif() + ## --- Build static version of the library, if requested --- + + if(PAHO_BUILD_STATIC) ++ ++ ## set PAHO_C_LIB ++ if(PAHO_WITH_SSL) ++ set(_PAHO_MQTT_C_LIB_NAME eclipse-paho-mqtt-c::paho-mqtt3as-static eclipse-paho-mqtt-c::paho-mqtt3cs-static) ++ else() ++ set(_PAHO_MQTT_C_LIB_NAME eclipse-paho-mqtt-c::paho-mqtt3a-static eclipse-paho-mqtt-c::paho-mqtt3c-static) ++ endif() ++ + ## create the static library + add_library(paho-mqttpp3-static STATIC $<TARGET_OBJECTS:paho-cpp-objs>) + ## add dependencies to the shared library target_link_libraries(paho-mqttpp3-static PRIVATE ${LIBS_SYSTEM} -- PUBLIC PahoMqttC::PahoMqttC) -+ PUBLIC eclipse-paho-mqtt-c::paho-mqtt3as-static eclipse-paho-mqtt-c::paho-mqtt3cs-static) +- PUBLIC PahoMqttC::PahoMqttC Threads::Threads) ++ PUBLIC ${_PAHO_MQTT_C_LIB_NAME} Threads::Threads) target_include_directories(paho-mqttpp3-static PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}> |
