aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Schumacher <roschuma@microsoft.com>2017-06-05 17:37:03 -0700
committerGitHub <noreply@github.com>2017-06-05 17:37:03 -0700
commit77e556a18622fdce4d9ea6c8230c11c5cf9ce3f6 (patch)
tree7afc955876340a6b0962d8cdade0f4c9eaacf422
parent40d0fe7f27e8e5d3be21786cd3dfa544f91f4a55 (diff)
parent1b0094fd57cc5318c179d8c1b66938072733cf9f (diff)
downloadvcpkg-77e556a18622fdce4d9ea6c8230c11c5cf9ce3f6.tar.gz
vcpkg-77e556a18622fdce4d9ea6c8230c11c5cf9ce3f6.zip
Merge pull request #1210 from atkawa7/mqtt
Mqtt Portfile
-rw-r--r--ports/paho-mqtt/CONTROL4
-rw-r--r--ports/paho-mqtt/portfile.cmake56
2 files changed, 60 insertions, 0 deletions
diff --git a/ports/paho-mqtt/CONTROL b/ports/paho-mqtt/CONTROL
new file mode 100644
index 000000000..7981a5195
--- /dev/null
+++ b/ports/paho-mqtt/CONTROL
@@ -0,0 +1,4 @@
+Source: paho-mqtt
+Version: Version 1.1.0 (Paho 1.2)
+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
diff --git a/ports/paho-mqtt/portfile.cmake b/ports/paho-mqtt/portfile.cmake
new file mode 100644
index 000000000..5fc6341f8
--- /dev/null
+++ b/ports/paho-mqtt/portfile.cmake
@@ -0,0 +1,56 @@
+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
+)
+
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ OPTIONS -DPAHO_WITH_SSL=TRUE
+)
+
+
+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"
+)
+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"
+)
+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"
+)
+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"
+)
+file(GLOB HEADERS "${SOURCE_PATH}/*/*.h")
+if(DLLS)
+ 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)
+endif()
+file(INSTALL ${DEBUG_LIBS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib)
+file(INSTALL ${HEADERS} DESTINATION ${CURRENT_PACKAGES_DIR}/include)
+
+vcpkg_copy_pdbs()
+
+
+file(INSTALL ${SOURCE_PATH}/about.html DESTINATION ${CURRENT_PACKAGES_DIR}/share/paho-mqtt RENAME copyright)
+
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)