vcpkg/ports/azure-uhttp-c/portfile.cmake
ewertons e290fc43fa [azure] Update vcpkgs (add new port dependencies) (#6511)
* [azure] Update vcpkgs (add new port dependencies)

* [azure-iot-sdk-c] Bump CONTROL versions and normalize tabs/spaces

* [azure] ACR of Update vcpkgs (add new port dependencies)
2019-05-20 10:27:45 -07:00

45 lines
1.4 KiB
CMake

include(vcpkg_common_functions)
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
if("public-preview" IN_LIST FEATURES)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO Azure/azure-uhttp-c
REF 43dce924b32818f8ab851f972cffebc204edc5c4
SHA512 0e5e9e7dac0c8a1a01cea2fd9ef068f988ad3453f978957cbcb009126637fe5810001e273e7b300b4540914705a89250d96df652c4bb2c7f5348cd8ce7240d70
HEAD_REF master
)
else()
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO Azure/azure-uhttp-c
REF b8976adff02e543fc00e7db59eae9ce78dd014fe
SHA512 65ddccc07831309c4f3f8546bb1a45a6eff84674013311a15c99389d4fc33eaf2ef3da6c7c8e4bb03d32955d12c978190e7badb597379a9fefda4ebcf18827ec
HEAD_REF master
)
endif()
file(COPY ${CURRENT_INSTALLED_DIR}/share/azure-c-shared-utility/azure_iot_build_rules.cmake DESTINATION ${SOURCE_PATH}/deps/c-utility/configs/)
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
OPTIONS
-Dskip_samples=ON
-Duse_installed_dependencies=ON
-Dbuild_as_dynamic=OFF
-DCMAKE_INSTALL_INCLUDEDIR=include
)
vcpkg_install_cmake()
vcpkg_fixup_cmake_targets(CONFIG_PATH cmake TARGET_PATH share/uhttp)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share)
configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/azure-uhttp-c/copyright COPYONLY)
vcpkg_copy_pdbs()