2017-06-02 05:25:40 +08:00
|
|
|
vcpkg_from_github(
|
2017-09-04 05:16:09 +08:00
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO eclipse/paho.mqtt.c
|
2020-11-12 07:18:34 +08:00
|
|
|
REF 153dfd3a4a1d510697c5d55e169fa158db16e04a # v1.3.5
|
|
|
|
SHA512 231978c9159b85f4b189574bfe982d99ef75aabbb616bf88f251e4fe1797fd89156b4090c6d7e05703fe9394b3243a906196cb54dab3044727b03bbc64a63e5b
|
2017-09-04 05:16:09 +08:00
|
|
|
HEAD_REF master
|
|
|
|
PATCHES
|
2019-05-21 14:29:15 +08:00
|
|
|
remove_compiler_options.patch
|
|
|
|
fix-install-path.patch
|
2019-06-09 10:09:18 +08:00
|
|
|
fix-unresolvedsymbol-arm.patch
|
2017-06-02 05:25:40 +08:00
|
|
|
)
|
|
|
|
|
2019-05-21 14:29:15 +08:00
|
|
|
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" PAHO_BUILD_STATIC)
|
2020-11-12 07:18:34 +08:00
|
|
|
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" PAHO_BUILD_DYNAMIC)
|
2017-06-02 05:25:40 +08:00
|
|
|
|
|
|
|
vcpkg_configure_cmake(
|
2017-09-04 05:16:09 +08:00
|
|
|
SOURCE_PATH ${SOURCE_PATH}
|
2017-09-21 11:00:57 +08:00
|
|
|
PREFER_NINJA
|
2020-01-23 04:04:53 +08:00
|
|
|
OPTIONS
|
|
|
|
-DPAHO_WITH_SSL=TRUE
|
2020-11-12 07:18:34 +08:00
|
|
|
-DPAHO_BUILD_SHARED=${PAHO_BUILD_DYNAMIC}
|
2020-01-23 04:04:53 +08:00
|
|
|
-DPAHO_BUILD_STATIC=${PAHO_BUILD_STATIC}
|
|
|
|
-DPAHO_ENABLE_TESTING=FALSE
|
2017-06-02 05:25:40 +08:00
|
|
|
)
|
|
|
|
|
2019-05-21 14:29:15 +08:00
|
|
|
vcpkg_install_cmake()
|
2020-11-12 07:18:34 +08:00
|
|
|
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/eclipse-paho-mqtt-c TARGET_PATH share/eclipse-paho-mqtt-c)
|
2017-09-21 11:00:57 +08:00
|
|
|
vcpkg_copy_pdbs()
|
2017-06-02 05:25:40 +08:00
|
|
|
|
2020-11-12 07:18:34 +08:00
|
|
|
if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
|
|
|
|
vcpkg_copy_tools(TOOL_NAMES MQTTVersion AUTO_CLEAN)
|
|
|
|
endif()
|
2019-05-21 14:29:15 +08:00
|
|
|
|
2020-11-12 07:18:34 +08:00
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include" "${CURRENT_PACKAGES_DIR}/debug/share")
|
|
|
|
|
|
|
|
file(COPY ${SOURCE_PATH}/README.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT})
|
2020-01-23 04:04:53 +08:00
|
|
|
file(INSTALL ${SOURCE_PATH}/about.html DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
|