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
|
2023-04-20 03:10:07 +08:00
|
|
|
REF "v${VERSION}"
|
|
|
|
SHA512 3152b557a8ab7c9b9c80277283e0f5e9965ce4c2ebbdaef0f238908d49e6fa1281aa72932ea112a836144b79656e4abe6e0cbd93840429a52e501a2c6b12d313
|
2017-09-04 05:16:09 +08:00
|
|
|
HEAD_REF master
|
|
|
|
PATCHES
|
2021-07-07 04:40:02 +08:00
|
|
|
fix-unresolvedsymbol-arm.patch
|
2023-04-20 03:10:07 +08:00
|
|
|
fix-ODR-libuuid-linux.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
|
|
|
|
2022-06-16 02:02:28 +08:00
|
|
|
vcpkg_cmake_configure(
|
|
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
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
|
|
|
)
|
|
|
|
|
2022-06-16 02:02:28 +08:00
|
|
|
vcpkg_cmake_install()
|
|
|
|
vcpkg_cmake_config_fixup(PACKAGE_NAME eclipse-paho-mqtt-c CONFIG_PATH lib/cmake/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
|
|
|
|
2023-04-20 03:10:07 +08:00
|
|
|
if(VCPKG_TARGET_IS_WINDOWS OR VCPKG_TARGET_IS_OSX)
|
|
|
|
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)]]
|
|
|
|
)
|
|
|
|
else()
|
|
|
|
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)
|
|
|
|
find_dependency(unofficial-libuuid CONFIG)]]
|
|
|
|
)
|
|
|
|
endif()
|
2022-06-16 02:02:28 +08:00
|
|
|
|
2020-11-12 07:18:34 +08:00
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include" "${CURRENT_PACKAGES_DIR}/debug/share")
|
2022-06-16 02:02:28 +08:00
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/share/doc")
|
2020-11-12 07:18:34 +08:00
|
|
|
|
2023-04-20 03:10:07 +08:00
|
|
|
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")
|