2018-03-24 06:04:01 +08:00
|
|
|
include(vcpkg_common_functions)
|
|
|
|
|
|
|
|
if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
|
|
|
|
message("azure-c-shared-utility only supports static linkage")
|
|
|
|
set(VCPKG_LIBRARY_LINKAGE "static")
|
|
|
|
endif()
|
|
|
|
|
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO Azure/azure-c-shared-utility
|
2018-03-24 06:09:07 +08:00
|
|
|
REF 1.0.0-pre-release-1.0.9
|
|
|
|
SHA512 df28d0bb01961943d86febd7b54bafd7037b8461b4025e1db26ba0b76c4cadfa722c4cb5695ac0d4f57e16576eb23f3da02703bcc363af54a0476bccec95ce45
|
2018-03-24 06:04:01 +08:00
|
|
|
HEAD_REF master
|
|
|
|
)
|
|
|
|
|
|
|
|
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
|
|
|
|
-Duse_default_uuid=ON
|
|
|
|
-Dbuild_as_dynamic=${BUILD_AS_DYNAMIC}
|
|
|
|
)
|
|
|
|
|
|
|
|
vcpkg_install_cmake()
|
|
|
|
|
|
|
|
vcpkg_fixup_cmake_targets(CONFIG_PATH cmake TARGET_PATH share/azure_c_shared_utility)
|
|
|
|
|
|
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share)
|
|
|
|
|
|
|
|
file(COPY ${SOURCE_PATH}/configs/azure_iot_build_rules.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/azure-c-shared-utility)
|
|
|
|
|
|
|
|
file(INSTALL
|
|
|
|
${SOURCE_PATH}/LICENSE
|
|
|
|
DESTINATION ${CURRENT_PACKAGES_DIR}/share/azure-c-shared-utility RENAME copyright)
|
|
|
|
|
|
|
|
vcpkg_copy_pdbs()
|