2019-07-16 05:17:41 +08:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO eclipse/paho.mqtt.cpp
|
2024-07-11 23:52:08 +08:00
|
|
|
REF "v${VERSION}"
|
|
|
|
SHA512 bc965ce85e723fad06865bb8b7c6d0d2f48b08fee8074d7c5099d1648cd0579e0e52cea2f1c0ac2fe751970ac22c7f29df0c3eae8ee6357a13c901aaeff35c62
|
2019-07-16 05:17:41 +08:00
|
|
|
HEAD_REF master
|
|
|
|
)
|
|
|
|
|
2024-07-23 08:24:31 +08:00
|
|
|
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" PAHO_BUILD_STATIC)
|
|
|
|
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" PAHO_BUILD_SHARED)
|
|
|
|
|
2023-12-07 06:21:01 +08:00
|
|
|
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
2021-04-10 00:14:29 +08:00
|
|
|
FEATURES
|
|
|
|
"ssl" PAHO_WITH_SSL
|
2019-08-14 11:13:55 +08:00
|
|
|
)
|
2019-07-16 05:17:41 +08:00
|
|
|
|
2022-06-16 02:02:28 +08:00
|
|
|
vcpkg_cmake_configure(
|
|
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
2019-07-16 05:17:41 +08:00
|
|
|
OPTIONS
|
2024-07-23 08:24:31 +08:00
|
|
|
-DPAHO_BUILD_STATIC=${PAHO_BUILD_STATIC}
|
|
|
|
-DPAHO_BUILD_SHARED=${PAHO_BUILD_SHARED}
|
2021-04-10 00:14:29 +08:00
|
|
|
${FEATURE_OPTIONS}
|
2019-07-16 05:17:41 +08:00
|
|
|
)
|
2022-06-16 02:02:28 +08:00
|
|
|
vcpkg_cmake_install()
|
2019-07-16 05:17:41 +08:00
|
|
|
vcpkg_copy_pdbs()
|
2024-07-23 08:24:31 +08:00
|
|
|
vcpkg_cmake_config_fixup(PACKAGE_NAME pahomqttcpp CONFIG_PATH "lib/cmake/PahoMqttCpp")
|
2019-07-16 05:17:41 +08:00
|
|
|
|
2022-06-16 02:02:28 +08:00
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
|
2019-07-16 05:17:41 +08:00
|
|
|
|
2024-07-23 08:24:31 +08:00
|
|
|
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/about.html")
|