mirror of
https://github.com/microsoft/vcpkg.git
synced 2025-01-19 05:43:03 +08:00
Merge pull request #1772 from atkawa7/paho-mqqt-update
[paho-mqtt] update
This commit is contained in:
commit
41fa09af20
@ -1,4 +1,4 @@
|
||||
Source: paho-mqtt
|
||||
Version: Version 1.1.0 (Paho 1.2)
|
||||
Version: 1.2.0
|
||||
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
|
||||
|
16
ports/paho-mqtt/disable_tests.patch
Normal file
16
ports/paho-mqtt/disable_tests.patch
Normal file
@ -0,0 +1,16 @@
|
||||
diff --git "a/CMakeLists.txt" "b/CMakeLists.txt"
|
||||
index c041df0..2feb580 100644
|
||||
--- "a/CMakeLists.txt"
|
||||
+++ "b/CMakeLists.txt"
|
||||
@@ -94,7 +94,10 @@ SET(CPACK_PACKAGE_VERSION_MINOR ${PAHO_VERSION_MINOR})
|
||||
SET(CPACK_PACKAGE_VERSION_PATCH ${PAHO_VERSION_PATCH})
|
||||
INCLUDE(CPack)
|
||||
|
||||
+if(BUILD_TESTS)
|
||||
ENABLE_TESTING()
|
||||
|
||||
INCLUDE_DIRECTORIES(test src)
|
||||
ADD_SUBDIRECTORY(test)
|
||||
+
|
||||
+endif()
|
||||
\ No newline at end of file
|
@ -1,56 +1,74 @@
|
||||
include(vcpkg_common_functions)
|
||||
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO eclipse/paho.mqtt.c
|
||||
REF v1.1.0
|
||||
SHA512 49eebf258e15076048103ff79442ad0d21164b83f713eee7f226998106b5931d310871d3b372322d5ef1cb2801219a6e626400b6fe4198814150a6277d6bfd74
|
||||
HEAD_REF master
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO eclipse/paho.mqtt.c
|
||||
REF v1.2.0
|
||||
SHA512 ffad01a8f9f41049dd008e163136e4ecb8c7c51f7b49917201593b0844b15a8d2a413ddec06fa5b2d77e432f0603b71664a23afbb7c215121cebd7d419ccacfa
|
||||
HEAD_REF master
|
||||
)
|
||||
|
||||
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" PAHO_BUILD_STATIC)
|
||||
|
||||
|
||||
vcpkg_apply_patches(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
PATCHES
|
||||
"${CMAKE_CURRENT_LIST_DIR}/disable_tests.patch"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/remove_compiler_options.patch"
|
||||
)
|
||||
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
OPTIONS -DPAHO_WITH_SSL=TRUE
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
OPTIONS -DPAHO_WITH_SSL=TRUE -DPAHO_BUILD_STATIC=${PAHO_BUILD_STATIC}
|
||||
)
|
||||
|
||||
|
||||
vcpkg_build_cmake()
|
||||
|
||||
file(GLOB DLLS
|
||||
"${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/*.dll"
|
||||
"${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/Release/*.dll"
|
||||
"${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/*/Release/*.dll"
|
||||
"${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/*.dll"
|
||||
"${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/Release/*.dll"
|
||||
"${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/*/Release/*.dll"
|
||||
)
|
||||
file(GLOB LIBS
|
||||
"${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/*.lib"
|
||||
"${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/Release/*.lib"
|
||||
"${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/*/Release/*.lib"
|
||||
"${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/*.lib"
|
||||
"${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/Release/*.lib"
|
||||
"${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/*/Release/*.lib"
|
||||
)
|
||||
file(GLOB DEBUG_DLLS
|
||||
"${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/*.dll"
|
||||
"${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/Debug/*.dll"
|
||||
"${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/*/Debug/*.dll"
|
||||
"${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/*.dll"
|
||||
"${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/Debug/*.dll"
|
||||
"${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/*/Debug/*.dll"
|
||||
)
|
||||
file(GLOB DEBUG_LIBS
|
||||
"${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/*.lib"
|
||||
"${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/Debug/*.lib"
|
||||
"${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/*/Debug/*.lib"
|
||||
"${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/*.lib"
|
||||
"${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/Debug/*.lib"
|
||||
"${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/*/Debug/*.lib"
|
||||
)
|
||||
file(GLOB HEADERS "${SOURCE_PATH}/*/*.h")
|
||||
if(DLLS)
|
||||
file(INSTALL ${DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/bin)
|
||||
file(INSTALL ${DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/bin)
|
||||
endif()
|
||||
file(INSTALL ${LIBS} DESTINATION ${CURRENT_PACKAGES_DIR}/lib)
|
||||
if(DEBUG_DLLS)
|
||||
file(INSTALL ${DEBUG_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin)
|
||||
file(INSTALL ${DEBUG_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin)
|
||||
endif()
|
||||
file(INSTALL ${DEBUG_LIBS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib)
|
||||
file(INSTALL ${HEADERS} DESTINATION ${CURRENT_PACKAGES_DIR}/include)
|
||||
|
||||
vcpkg_copy_pdbs()
|
||||
|
||||
if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin)
|
||||
foreach(libname paho-mqtt3as-static paho-mqtt3cs-static paho-mqtt3a-static paho-mqtt3c-static)
|
||||
foreach(foldername "lib" "debug/lib")
|
||||
string(REPLACE "-static" "" outlibname ${libname})
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/${foldername}/${libname}.lib ${CURRENT_PACKAGES_DIR}/${foldername}/${outlibname}.lib)
|
||||
endforeach()
|
||||
endforeach()
|
||||
endif()
|
||||
|
||||
|
||||
file(INSTALL ${SOURCE_PATH}/about.html DESTINATION ${CURRENT_PACKAGES_DIR}/share/paho-mqtt RENAME copyright)
|
||||
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
||||
|
13
ports/paho-mqtt/remove_compiler_options.patch
Normal file
13
ports/paho-mqtt/remove_compiler_options.patch
Normal file
@ -0,0 +1,13 @@
|
||||
diff --git "a/CMakeLists.txt" "b/CMakeLists.txt"
|
||||
index 2feb580..796d08e 100644
|
||||
--- "a/CMakeLists.txt"
|
||||
+++ "b/CMakeLists.txt"
|
||||
@@ -55,7 +55,7 @@ IF(CMAKE_SYSTEM_NAME MATCHES "Linux")
|
||||
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()
|
Loading…
Reference in New Issue
Block a user