Skip to content

Commit

Permalink
[paho-mqtt] Update to version 1.3.5 (#13680)
Browse files Browse the repository at this point in the history
* [paho-mqtt] Update to version 1.3.5

* [paho-mqtt] Fix build error

* [paho-mqttpp3] Fix build error

* [paho-mqttpp3] Fix build error

* [paho-mqttpp3] Fix build error

* [paho-mqtt] Fix old patch

* [paho-mqtt] Add vcpkg_copy_tools

* [paho-mqtt] Fix build error
  • Loading branch information
LilyWangL committed Nov 11, 2020
1 parent 6a7a309 commit 53b9f6e
Show file tree
Hide file tree
Showing 10 changed files with 61 additions and 364 deletions.
2 changes: 1 addition & 1 deletion ports/paho-mqtt/CONTROL
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Source: paho-mqtt
Version: 1.3.1
Version: 1.3.5
Homepage: https://github.com/eclipse/paho.mqtt.c
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
Build-Depends: openssl
101 changes: 0 additions & 101 deletions ports/paho-mqtt/export-cmake-targets.patch

This file was deleted.

84 changes: 28 additions & 56 deletions ports/paho-mqtt/fix-install-path.patch
Original file line number Diff line number Diff line change
@@ -1,56 +1,28 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 64ae92c..6d552d1 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -64,11 +64,11 @@ ENDIF()
IF (PAHO_ENABLE_CPACK)
### packaging settings
FILE(GLOB samples "src/samples/*.c")
- INSTALL(FILES ${samples} DESTINATION samples)
+ INSTALL(FILES ${samples} DESTINATION share/paho-mqtt/samples)

SET(CPACK_PACKAGE_VENDOR "Eclipse Paho")
SET(CPACK_PACKAGE_NAME "Eclipse-Paho-MQTT-C")
- INSTALL(FILES CONTRIBUTING.md epl-v10 edl-v10 README.md notice.html DESTINATION .)
+ INSTALL(FILES CONTRIBUTING.md epl-v10 edl-v10 README.md notice.html DESTINATION share/paho-mqtt)

IF (WIN32)
SET(CPACK_GENERATOR "ZIP")
diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt
index f15f314..54deec5 100644
--- a/doc/CMakeLists.txt
+++ b/doc/CMakeLists.txt
@@ -39,7 +39,7 @@ ENDFOREACH(DOXYFILE_SRC)

ADD_CUSTOM_TARGET(doc ALL DEPENDS ${DOXYTARGETS})
IF (PAHO_ENABLE_CPACK)
- INSTALL(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/doc DESTINATION share)
+ INSTALL(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/doc DESTINATION share/paho-mqtt)
ELSE()
INSTALL(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/doc DESTINATION ${CMAKE_INSTALL_DOCDIR})
ENDIF()
\ No newline at end of file
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index b46eaca..a132062 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -89,7 +89,7 @@ INSTALL(TARGETS paho-mqtt3c paho-mqtt3a
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
INSTALL(TARGETS MQTTVersion
- RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
+ RUNTIME DESTINATION tools/paho-mqtt)

IF (PAHO_BUILD_STATIC)
ADD_LIBRARY(paho-mqtt3c-static STATIC $<TARGET_OBJECTS:common_obj> MQTTClient.c)
@@ -102,8 +102,8 @@ IF (PAHO_BUILD_STATIC)
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
ENDIF()

-INSTALL(FILES MQTTAsync.h MQTTClient.h MQTTClientPersistence.h MQTTProperties.h MQTTReasonCodes.h MQTTSubscribeOpts.h
- DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
+INSTALL(FILES MQTTAsync.h MQTTClient.h MQTTClientPersistence.h MQTTProperties.h MQTTReasonCodes.h MQTTSubscribeOpts.h
+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/paho-mqtt)

IF (PAHO_WITH_SSL)
SET(OPENSSL_SEARCH_PATH "" CACHE PATH "Directory containing OpenSSL libraries and includes")
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3df385a..1ee7be0 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)
ENDIF()

ADD_SUBDIRECTORY(src)
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 20b578a..75dc833 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")
97 changes: 0 additions & 97 deletions ports/paho-mqtt/fix-static-build.patch

This file was deleted.

24 changes: 12 additions & 12 deletions ports/paho-mqtt/fix-unresolvedsymbol-arm.patch
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
diff --git a/src/SHA1.c b/src/SHA1.c
index 9bb1175..b2ef930 100644
--- a/src/SHA1.c
+++ b/src/SHA1.c
@@ -19,6 +19,7 @@
#if !defined(OPENSSL)
#if defined(WIN32) || defined(WIN64)
#pragma comment(lib, "crypt32.lib")
+#pragma comment(lib, "Advapi32.lib")

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

int SHA1_Init(SHA_CTX *c)
{
79 changes: 0 additions & 79 deletions ports/paho-mqtt/fix-win-macro.patch

This file was deleted.

0 comments on commit 53b9f6e

Please sign in to comment.