vcpkg/ports/azure-uamqp-c/portfile.cmake
2024-06-24 17:55:52 -07:00

32 lines
1020 B
CMake

vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO Azure/azure-uamqp-c
REF 6a150b07352304acacdde2e446643f8f6de0ea3a
SHA512 eb2e70b75665886e3f27fb89fb23eb5b5a096066d7b27bcb3dc435fffd31363dd593d03aac31e983eee72484eb79411788cedcd444846c2a300ab1abdf416bd0
HEAD_REF master
)
file(COPY ${CURRENT_INSTALLED_DIR}/share/azure-c-shared-utility/azure_iot_build_rules.cmake DESTINATION ${SOURCE_PATH}/deps/azure-c-shared-utility/configs/)
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
-Dskip_samples=ON
-Duse_installed_dependencies=ON
-Dbuild_as_dynamic=OFF
MAYBE_UNUSED_VARIABLES
build_as_dynamic
)
vcpkg_cmake_install()
vcpkg_cmake_config_fixup(PACKAGE_NAME uamqp CONFIG_PATH "cmake")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include" "${CURRENT_PACKAGES_DIR}/debug/share")
configure_file("${SOURCE_PATH}/LICENSE" "${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright" COPYONLY)
vcpkg_copy_pdbs()