windows-amd64-prebuilt-libr.../vcpkg/ports/azure-uhttp-c/portfile.cmake
2020-10-10 14:36:42 +02:00

43 lines
1.4 KiB
CMake

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 d84a20609a2b5a555920389451fb3c9a2ed3656c
SHA512 4eadd7e120082cc3bcf696d6cd16bc7ee8e1082380dd7583fba7fad1bb95109f3456890495e25ae7675e656ef721fa12eff22eeb96d8a4cf359be5c96889cbd6
HEAD_REF master
)
else()
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO Azure/azure-uhttp-c
REF ef8ba1591b0f825315b78380331ff9290197db02
SHA512 3e0434272de684a43189d491c16ab7e20ffcfd08f8addb01f64caa446211faa67e45aa51c403520df6a105cc9ac50b85de1b9e0954510fd4232c0f19d01fea9c
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/${PORT}/copyright COPYONLY)
vcpkg_copy_pdbs()