mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-31 05:03:22 +08:00
41 lines
1.2 KiB
CMake
41 lines
1.2 KiB
CMake
include(vcpkg_common_functions)
|
|
|
|
if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
|
|
message("azure-uhttp-c only supports static linkage")
|
|
set(VCPKG_LIBRARY_LINKAGE "static")
|
|
endif()
|
|
|
|
vcpkg_from_github(
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
REPO Azure/azure-uhttp-c
|
|
REF 2018-02-09
|
|
SHA512 0668be0f7624d021b6d24e81c21c606ab4a59990eb3d83fea6d2c6cf9ea3f2c6904ad021afcf9645c3c5f2238e9b83146f36522c662b0a2626d928cb4a0218ba
|
|
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/)
|
|
|
|
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" BUILD_AS_DYNAMIC)
|
|
|
|
vcpkg_configure_cmake(
|
|
SOURCE_PATH ${SOURCE_PATH}
|
|
PREFER_NINJA
|
|
OPTIONS
|
|
-Dskip_samples=ON
|
|
-Duse_installed_dependencies=ON
|
|
-Dbuild_as_dynamic=${BUILD_AS_DYNAMIC}
|
|
-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)
|
|
|
|
file(INSTALL
|
|
${SOURCE_PATH}/LICENSE
|
|
DESTINATION ${CURRENT_PACKAGES_DIR}/share/azure-uhttp-c RENAME copyright)
|
|
|
|
vcpkg_copy_pdbs()
|