[paho-mqtt] Update to 1.3.10 and fix include path (#25207)

* [paho-mqtt] Update to 1.3.10 and fix include path

* x-add-version

* fix paho-mqttpp3

* x-add-version

* install LICENSE

* x-add-version

* remove documentations

* x-add-version

* apply suggestion

* x-add-version

Co-authored-by: Lily Wang <v-lilywang@microsoft.com>
This commit is contained in:
LilyWangLL 2022-06-16 02:02:28 +08:00 committed by GitHub
parent d4cd43eb7d
commit 96414493b3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
11 changed files with 61 additions and 319 deletions

View File

@ -1,28 +0,0 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index aa4ad05..669adde 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -60,8 +60,8 @@ IF (NOT PAHO_BUILD_SHARED AND NOT PAHO_BUILD_STATIC)
MESSAGE(FATAL_ERROR "You must set either PAHO_BUILD_SHARED, PAHO_BUILD_STATIC, or both")
ENDIF()
-IF(PAHO_BUILD_DEB_PACKAGE)
- set(CMAKE_INSTALL_DOCDIR share/doc/libpaho-mqtt)
+IF(1)
+ set(CMAKE_INSTALL_DOCDIR share/paho-mqtt)
set(CPACK_DEBIAN_PACKAGE_GENERATE_SHLIBS ON)
set(CPACK_DEBIAN_PACKAGE_GENERATE_SHLIBS_POLICY ">=")
ENDIF()
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 0bc7194..db4a0ac 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -183,7 +183,7 @@ IF (PAHO_BUILD_STATIC)
ENDIF()
INSTALL(FILES MQTTAsync.h MQTTClient.h MQTTClientPersistence.h MQTTProperties.h MQTTReasonCodes.h MQTTSubscribeOpts.h MQTTExportDeclarations.h
- DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/paho-mqtt)
IF (PAHO_WITH_SSL)
SET(OPENSSL_ROOT_DIR "" CACHE PATH "Directory containing OpenSSL libraries and includes")

View File

@ -1,11 +1,12 @@
diff --git a/src/SHA1.c b/src/SHA1.c
index 3ef07d9..f0e82ce 100644
index 3ef07d9..8ed6b16 100644
--- a/src/SHA1.c
+++ b/src/SHA1.c
@@ -19,6 +19,7 @@
@@ -18,7 +18,7 @@
#if !defined(OPENSSL)
#if defined(_WIN32) || defined(_WIN64)
#pragma comment(lib, "crypt32.lib")
-#pragma comment(lib, "crypt32.lib")
+#pragma comment(lib, "Advapi32.lib")
int SHA1_Init(SHA_CTX *c)

View File

@ -1,21 +1,18 @@
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO eclipse/paho.mqtt.c
REF 3b7ae6348bc917d42c04efa962e4868c09bbde9f # v1.3.9
SHA512 73c10b7da7aa228100511db280ae56484cb8c42b8f0cfafb2fa3f6e230b4bb1d6b3611aa9219736a0baa9d7de0baf802dd70dbf308077f1a745bd61a67a797c7
REF eff2da4875725509fc97641b118d6badf3e3a08f # v1.3.10
SHA512 5e190ffd978dad0f60b70bdad2727e567539aff2c55e38023dfbcbe9b50bcbe75d8230c501c09e9c0a0329bed3fd149d5d59d65ad0ba0f84a54f641b4f01390a
HEAD_REF master
PATCHES
remove_compiler_options.patch
fix-install-path.patch
fix-unresolvedsymbol-arm.patch
)
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" PAHO_BUILD_STATIC)
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" PAHO_BUILD_DYNAMIC)
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
-DPAHO_WITH_SSL=TRUE
-DPAHO_BUILD_SHARED=${PAHO_BUILD_DYNAMIC}
@ -23,15 +20,22 @@ vcpkg_configure_cmake(
-DPAHO_ENABLE_TESTING=FALSE
)
vcpkg_install_cmake()
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/eclipse-paho-mqtt-c TARGET_PATH share/eclipse-paho-mqtt-c)
vcpkg_cmake_install()
vcpkg_cmake_config_fixup(PACKAGE_NAME eclipse-paho-mqtt-c CONFIG_PATH lib/cmake/eclipse-paho-mqtt-c)
vcpkg_copy_pdbs()
if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
vcpkg_copy_tools(TOOL_NAMES MQTTVersion AUTO_CLEAN)
endif()
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include" "${CURRENT_PACKAGES_DIR}/debug/share")
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/share/eclipse-paho-mqtt-c/eclipse-paho-mqtt-cConfig.cmake"
[[# Generated by CMake]]
[[# Generated by CMake
include(CMakeFindDependencyMacro)
find_dependency(OpenSSL)]]
)
file(COPY ${SOURCE_PATH}/README.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT})
file(INSTALL ${SOURCE_PATH}/about.html DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include" "${CURRENT_PACKAGES_DIR}/debug/share")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/share/doc")
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)

View File

@ -1,13 +0,0 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 531c39c..3df385a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -41,7 +41,7 @@ IF (PAHO_HIGH_PERFORMANCE)
ENDIF()
IF(WIN32)
- ADD_DEFINITIONS(-D_CRT_SECURE_NO_DEPRECATE -DWIN32_LEAN_AND_MEAN -MD)
+ ADD_DEFINITIONS(-D_CRT_SECURE_NO_DEPRECATE -DWIN32_LEAN_AND_MEAN)
ELSEIF(${CMAKE_SYSTEM_NAME} STREQUAL "Darwin")
ADD_DEFINITIONS(-DOSX)
ENDIF()

View File

@ -1,9 +1,18 @@
{
"name": "paho-mqtt",
"version-semver": "1.3.9",
"version-semver": "1.3.10",
"description": "Paho project provides open-source client implementations of MQTT and MQTT-SN messaging protocols aimed at new, existing, and emerging applications for the Internet of Things",
"homepage": "https://github.com/eclipse/paho.mqtt.c",
"license": "EPL-2.0",
"dependencies": [
"openssl"
"openssl",
{
"name": "vcpkg-cmake",
"host": true
},
{
"name": "vcpkg-cmake-config",
"host": true
}
]
}

View File

@ -1,249 +0,0 @@
diff --git a/src/mqtt/async_client.h b/src/mqtt/async_client.h
index 7fb13a4..59247ca 100644
--- a/src/mqtt/async_client.h
+++ b/src/mqtt/async_client.h
@@ -25,7 +25,7 @@
#ifndef __mqtt_async_client_h
#define __mqtt_async_client_h
-#include "MQTTAsync.h"
+#include "paho-mqtt/MQTTAsync.h"
#include "mqtt/types.h"
#include "mqtt/token.h"
#include "mqtt/create_options.h"
diff --git a/src/mqtt/callback.h b/src/mqtt/callback.h
index 63f21a1..c4638fa 100644
--- a/src/mqtt/callback.h
+++ b/src/mqtt/callback.h
@@ -24,7 +24,7 @@
#ifndef __mqtt_callback_h
#define __mqtt_callback_h
-#include "MQTTAsync.h"
+#include "paho-mqtt/MQTTAsync.h"
#include "mqtt/delivery_token.h"
#include "mqtt/types.h"
#include <vector>
diff --git a/src/mqtt/connect_options.h b/src/mqtt/connect_options.h
index 8001fe3..650ba91 100644
--- a/src/mqtt/connect_options.h
+++ b/src/mqtt/connect_options.h
@@ -24,7 +24,7 @@
#ifndef __mqtt_connect_options_h
#define __mqtt_connect_options_h
-#include "MQTTAsync.h"
+#include "paho-mqtt/MQTTAsync.h"
#include "mqtt/types.h"
#include "mqtt/message.h"
#include "mqtt/topic.h"
diff --git a/src/mqtt/create_options.h b/src/mqtt/create_options.h
index d57e32b..2bb3561 100644
--- a/src/mqtt/create_options.h
+++ b/src/mqtt/create_options.h
@@ -24,7 +24,7 @@
#ifndef __mqtt_create_options_h
#define __mqtt_create_options_h
-#include "MQTTAsync.h"
+#include "paho-mqtt/MQTTAsync.h"
#include "mqtt/types.h"
namespace mqtt {
diff --git a/src/mqtt/delivery_token.h b/src/mqtt/delivery_token.h
index b70d582..ee1b306 100644
--- a/src/mqtt/delivery_token.h
+++ b/src/mqtt/delivery_token.h
@@ -24,7 +24,7 @@
#ifndef __mqtt_delivery_token_h
#define __mqtt_delivery_token_h
-#include "MQTTAsync.h"
+#include "paho-mqtt/MQTTAsync.h"
#include "mqtt/token.h"
#include "mqtt/message.h"
#include <memory>
diff --git a/src/mqtt/disconnect_options.h b/src/mqtt/disconnect_options.h
index db93679..2739d89 100644
--- a/src/mqtt/disconnect_options.h
+++ b/src/mqtt/disconnect_options.h
@@ -23,7 +23,7 @@
#ifndef __mqtt_disconnect_options_h
#define __mqtt_disconnect_options_h
-#include "MQTTAsync.h"
+#include "paho-mqtt/MQTTAsync.h"
#include "mqtt/types.h"
#include "mqtt/token.h"
#include "mqtt/properties.h"
diff --git a/src/mqtt/exception.h b/src/mqtt/exception.h
index 9db330a..32b7c97 100644
--- a/src/mqtt/exception.h
+++ b/src/mqtt/exception.h
@@ -24,7 +24,7 @@
#ifndef __mqtt_exception_h
#define __mqtt_exception_h
-#include "MQTTAsync.h"
+#include "paho-mqtt/MQTTAsync.h"
#include "mqtt/types.h"
#include <iostream>
#include <vector>
diff --git a/src/mqtt/iaction_listener.h b/src/mqtt/iaction_listener.h
index 1e34577..2af8c1b 100644
--- a/src/mqtt/iaction_listener.h
+++ b/src/mqtt/iaction_listener.h
@@ -24,7 +24,7 @@
#ifndef __mqtt_iaction_listener_h
#define __mqtt_iaction_listener_h
-#include "MQTTAsync.h"
+#include "paho-mqtt/MQTTAsync.h"
#include "mqtt/types.h"
#include <vector>
diff --git a/src/mqtt/iclient_persistence.h b/src/mqtt/iclient_persistence.h
index 635a292..aedc1d9 100644
--- a/src/mqtt/iclient_persistence.h
+++ b/src/mqtt/iclient_persistence.h
@@ -24,7 +24,7 @@
#ifndef __mqtt_iclient_persistence_h
#define __mqtt_iclient_persistence_h
-#include "MQTTAsync.h"
+#include "paho-mqtt/MQTTAsync.h"
#include "mqtt/types.h"
#include "mqtt/buffer_view.h"
#include "mqtt/string_collection.h"
diff --git a/src/mqtt/message.h b/src/mqtt/message.h
index 4cb95a6..e036269 100644
--- a/src/mqtt/message.h
+++ b/src/mqtt/message.h
@@ -25,7 +25,7 @@
#ifndef __mqtt_message_h
#define __mqtt_message_h
-#include "MQTTAsync.h"
+#include "paho-mqtt/MQTTAsync.h"
#include "mqtt/buffer_ref.h"
#include "mqtt/properties.h"
#include "mqtt/exception.h"
diff --git a/src/mqtt/properties.h b/src/mqtt/properties.h
index 826bc97..42c286a 100644
--- a/src/mqtt/properties.h
+++ b/src/mqtt/properties.h
@@ -25,7 +25,7 @@
#define __mqtt_properties_h
extern "C" {
- #include "MQTTProperties.h"
+ #include "paho-mqtt/MQTTAsync.h"
}
#include "mqtt/types.h"
diff --git a/src/mqtt/response_options.h b/src/mqtt/response_options.h
index 7bcb45c..40e45a2 100644
--- a/src/mqtt/response_options.h
+++ b/src/mqtt/response_options.h
@@ -7,7 +7,7 @@
#ifndef __mqtt_response_options_h
#define __mqtt_response_options_h
-#include "MQTTAsync.h"
+#include "paho-mqtt/MQTTAsync.h"
#include "mqtt/token.h"
#include "mqtt/delivery_token.h"
#include "subscribe_options.h"
diff --git a/src/mqtt/server_response.h b/src/mqtt/server_response.h
index a111839..094135b 100644
--- a/src/mqtt/server_response.h
+++ b/src/mqtt/server_response.h
@@ -24,7 +24,7 @@
#ifndef __mqtt_server_response_h
#define __mqtt_server_response_h
-#include "MQTTAsync.h"
+#include "paho-mqtt/MQTTAsync.h"
#include "mqtt/types.h"
#include "mqtt/properties.h"
diff --git a/src/mqtt/ssl_options.h b/src/mqtt/ssl_options.h
index eba49ed..aad0da3 100644
--- a/src/mqtt/ssl_options.h
+++ b/src/mqtt/ssl_options.h
@@ -27,7 +27,7 @@
#ifndef __mqtt_ssl_options_h
#define __mqtt_ssl_options_h
-#include "MQTTAsync.h"
+#include "paho-mqtt/MQTTAsync.h"
#include "mqtt/message.h"
#include "mqtt/topic.h"
#include "mqtt/types.h"
diff --git a/src/mqtt/string_collection.h b/src/mqtt/string_collection.h
index bc43775..99a2674 100644
--- a/src/mqtt/string_collection.h
+++ b/src/mqtt/string_collection.h
@@ -24,7 +24,7 @@
#ifndef __mqtt_string_collection_h
#define __mqtt_string_collection_h
-#include "MQTTAsync.h"
+#include "paho-mqtt/MQTTAsync.h"
#include "mqtt/types.h"
#include <vector>
#include <map>
diff --git a/src/mqtt/subscribe_options.h b/src/mqtt/subscribe_options.h
index 753c811..5f0d86c 100644
--- a/src/mqtt/subscribe_options.h
+++ b/src/mqtt/subscribe_options.h
@@ -24,8 +24,8 @@
#ifndef __mqtt_subscribe_options_h
#define __mqtt_subscribe_options_h
-#include "MQTTAsync.h"
-#include "MQTTSubscribeOpts.h"
+#include "paho-mqtt/MQTTAsync.h"
+#include "paho-mqtt/MQTTSubscribeOpts.h"
#include "mqtt/types.h"
namespace mqtt {
diff --git a/src/mqtt/token.h b/src/mqtt/token.h
index 4cafda7..1815ab9 100644
--- a/src/mqtt/token.h
+++ b/src/mqtt/token.h
@@ -25,7 +25,7 @@
#ifndef __mqtt_token_h
#define __mqtt_token_h
-#include "MQTTAsync.h"
+#include "paho-mqtt/MQTTAsync.h"
#include "mqtt/iaction_listener.h"
#include "mqtt/exception.h"
#include "mqtt/types.h"
diff --git a/src/mqtt/topic.h b/src/mqtt/topic.h
index 618eb85..555de60 100644
--- a/src/mqtt/topic.h
+++ b/src/mqtt/topic.h
@@ -24,7 +24,7 @@
#ifndef __mqtt_topic_h
#define __mqtt_topic_h
-#include "MQTTAsync.h"
+#include "paho-mqtt/MQTTAsync.h"
#include "mqtt/delivery_token.h"
#include "mqtt/subscribe_options.h"
#include "mqtt/message.h"
diff --git a/src/mqtt/will_options.h b/src/mqtt/will_options.h
index 8c5c67d..63bfffc 100644
--- a/src/mqtt/will_options.h
+++ b/src/mqtt/will_options.h
@@ -26,7 +26,7 @@
#ifndef __mqtt_will_options_h
#define __mqtt_will_options_h
-#include "MQTTAsync.h"
+#include "paho-mqtt/MQTTAsync.h"
#include "mqtt/types.h"
#include "mqtt/message.h"
#include "mqtt/topic.h"

View File

@ -6,7 +6,6 @@ vcpkg_from_github(
SHA512 3f4a91987e0106e50e637d8d4fb13a4f8aca14eea168102664fdcebd1260609434e679f5986a1c4d71746735530f1b72fc29d2ac05cb35b3ce734a6aab1a0a55
HEAD_REF master
PATCHES
fix-include-path.patch
fix-dependency.patch
)
@ -43,9 +42,8 @@ else()
set(PAHO_OPTIONS)
endif()
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
-DPAHO_BUILD_STATIC=${PAHO_MQTTPP3_STATIC}
-DPAHO_BUILD_SHARED=${PAHO_MQTTPP3_SHARED}
@ -55,13 +53,13 @@ vcpkg_configure_cmake(
)
# Run the build, copy pdbs and fixup the cmake targets
vcpkg_install_cmake()
vcpkg_cmake_install()
vcpkg_copy_pdbs()
vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake/PahoMqttCpp" TARGET_PATH "share/pahomqttcpp")
vcpkg_cmake_config_fixup(PACKAGE_NAME PahoMqttCpp CONFIG_PATH "lib/cmake/PahoMqttCpp")
# Remove the include and share folders in debug folder
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
# Add copyright
file(INSTALL ${SOURCE_PATH}/about.html DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
file(INSTALL "${SOURCE_PATH}/about.html" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)

View File

@ -1,10 +1,20 @@
{
"name": "paho-mqttpp3",
"version": "1.2.0",
"port-version": 1,
"description": "Paho project provides open-source C++ wrapper for Paho C library",
"homepage": "https://github.com/eclipse/paho.mqtt.cpp",
"license": "EPL-1.0",
"dependencies": [
"paho-mqtt"
"paho-mqtt",
{
"name": "vcpkg-cmake",
"host": true
},
{
"name": "vcpkg-cmake-config",
"host": true
}
],
"default-features": [
"ssl"

View File

@ -5317,12 +5317,12 @@
"port-version": 0
},
"paho-mqtt": {
"baseline": "1.3.9",
"baseline": "1.3.10",
"port-version": 0
},
"paho-mqttpp3": {
"baseline": "1.2.0",
"port-version": 0
"port-version": 1
},
"palsigslot": {
"baseline": "1.2.1",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "9edde45ee5a278ee52bbb1891e9a30cab33669f8",
"version-semver": "1.3.10",
"port-version": 0
},
{
"git-tree": "b35399fddec4f6e4eb68e16308d2b1d86b0e5427",
"version-semver": "1.3.9",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "4e5982f9707bb0222b6694cee8d4a0d23698e20f",
"version": "1.2.0",
"port-version": 1
},
{
"git-tree": "850cb4a6ccac89062c16dd783ad0631215c1a94b",
"version": "1.2.0",