vcpkg/ports/azure-uhttp-c/portfile.cmake
Ewerton Scaboro da Silva 46385806b4
[azure-iot-sdk-c] LTS_03_2024 (#37201)
[azure-iot-sdk-c] LTS_03_2024
2024-03-07 22:38:40 -08:00

33 lines
1.0 KiB
CMake

vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO Azure/azure-uhttp-c
REF 9efe77ed921a7cedb7d7ca6c6a9cd2107ee9404a
SHA512 d940dac7751902b261a46c9289fed5570d5001bdda3849636ae7abaa29ecd464f58ee6953bd5d0f430bfefc9b7a3ec45a16a219f7ab91523ba75bcd8c49c0995
HEAD_REF master
)
file(COPY ${CURRENT_INSTALLED_DIR}/share/azure-c-shared-utility/azure_iot_build_rules.cmake DESTINATION ${SOURCE_PATH}/deps/c-utility/configs/)
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
-Dskip_samples=ON
-Duse_installed_dependencies=ON
-Dbuild_as_dynamic=OFF
-DCMAKE_INSTALL_INCLUDEDIR=include
MAYBE_UNUSED_VARIABLES
build_as_dynamic
)
vcpkg_cmake_install()
vcpkg_cmake_config_fixup(PACKAGE_NAME uhttp CONFIG_PATH "lib/cmake/uhttp")
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()