vcpkg/ports/azure-iot-sdk-c/portfile.cmake
ewertons 195e4aa18a [azure-iot] vcpkg update for master/public-preview release (#5789)
* [azure-iot] vcpkg update for master/public-preview release

* [azure] Fix download hash strings

* [azure] Bump CONTROL versions
2019-03-26 23:21:51 -07:00

48 lines
1.6 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 68d9964daa3e6754f6f8d98bbbd637b0967d4d29
SHA512 5492ab06ae3686c7a167d63620d6ca00024dd52d46627d7958569f1ec0cfca1b56151d54b8c7975f127f655018c10e830747ef84a0cdc66a44e903e25b2dc985
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 8c331e8552f754bb6e0502486ceee698625eb468
SHA512 cc6f34e04f237bb5e8e5445e033eefab00373d53a4847ab6089c9b8eb400ab87ced6905f1c78ea7d0da3e9a56145e86a58d2f226fcf38f08659330a33d68f82e
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/)
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()