mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-27 12:49:44 +08:00
49 lines
1.7 KiB
CMake
49 lines
1.7 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-iot-sdk-c
|
|
REF 8b7cc18456f377b7f0df42dcdefb24ae81d9e7fc
|
|
SHA512 0386889fc3d32a795998a35a382cce6d11f6712416f3a1a49de6ea7d9c0c973ca05989353ee9a3ec5ca02dc55c2b59dc803cbf4866b918274667e52d03d1490f
|
|
HEAD_REF public-preview
|
|
PATCHES improve-external-deps.patch
|
|
)
|
|
else()
|
|
vcpkg_from_github(
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
REPO Azure/azure-iot-sdk-c
|
|
REF b03cc5e0afb647934e45d4530d3e993476db3d3e
|
|
SHA512 7428c625dbacfd9ab612d5bbfad3c079074cd3834fe84a42db88e747aab2615140c0ca3035adc36b29ed8cf4bf487360522215ce03cee3e26254af925a68384a
|
|
HEAD_REF master
|
|
PATCHES improve-external-deps.patch
|
|
)
|
|
endif()
|
|
|
|
file(COPY ${CURRENT_INSTALLED_DIR}/share/azure-c-shared-utility/azure_iot_build_rules.cmake DESTINATION ${SOURCE_PATH}/deps/azure-c-shared-utility/configs/)
|
|
file(COPY ${SOURCE_PATH}/configs/azure_iot_sdksFunctions.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/cmake/azure_iot_sdks/)
|
|
|
|
vcpkg_configure_cmake(
|
|
SOURCE_PATH ${SOURCE_PATH}
|
|
PREFER_NINJA
|
|
OPTIONS
|
|
-Dskip_samples=ON
|
|
-Duse_installed_dependencies=ON
|
|
-Duse_default_uuid=ON
|
|
-Dbuild_as_dynamic=OFF
|
|
-Duse_edge_modules=ON
|
|
)
|
|
|
|
vcpkg_install_cmake()
|
|
|
|
vcpkg_fixup_cmake_targets(CONFIG_PATH cmake TARGET_PATH share/azure_iot_sdks)
|
|
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share)
|
|
|
|
configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/azure-iot-sdk-c/copyright COPYONLY)
|
|
|
|
vcpkg_copy_pdbs()
|
|
|