vcpkg/ports/paho-mqttpp3/portfile.cmake

32 lines
997 B
CMake
Raw Normal View History

vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO eclipse/paho.mqtt.cpp
REF "v${VERSION}"
SHA512 bc965ce85e723fad06865bb8b7c6d0d2f48b08fee8074d7c5099d1648cd0579e0e52cea2f1c0ac2fe751970ac22c7f29df0c3eae8ee6357a13c901aaeff35c62
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)
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
FEATURES
"ssl" PAHO_WITH_SSL
)
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
2024-07-23 08:24:31 +08:00
-DPAHO_BUILD_STATIC=${PAHO_BUILD_STATIC}
-DPAHO_BUILD_SHARED=${PAHO_BUILD_SHARED}
${FEATURE_OPTIONS}
)
vcpkg_cmake_install()
vcpkg_copy_pdbs()
2024-07-23 08:24:31 +08:00
vcpkg_cmake_config_fixup(PACKAGE_NAME pahomqttcpp CONFIG_PATH "lib/cmake/PahoMqttCpp")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
2024-07-23 08:24:31 +08:00
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/about.html")