mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-27 15:48:02 +08:00
40 lines
1.2 KiB
CMake
40 lines
1.2 KiB
CMake
include(vcpkg_common_functions)
|
|
|
|
if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
|
|
message("azure-umqtt-c only supports static linkage")
|
|
set(VCPKG_LIBRARY_LINKAGE "static")
|
|
endif()
|
|
|
|
vcpkg_from_github(
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
REPO Azure/azure-umqtt-c
|
|
REF 1.1.3
|
|
SHA512 5c57fe40dce8166e1e138db45b642152a337dbbbc4d85998ac99b016627c0135b99bd7b189d249c6278837ef4af5ba4e4f964a9b65788acef37d7b37ae125b16
|
|
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}
|
|
)
|
|
|
|
vcpkg_install_cmake()
|
|
|
|
vcpkg_fixup_cmake_targets(CONFIG_PATH cmake TARGET_PATH share/umqtt)
|
|
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share)
|
|
|
|
file(INSTALL
|
|
${SOURCE_PATH}/LICENSE
|
|
DESTINATION ${CURRENT_PACKAGES_DIR}/share/azure-umqtt-c RENAME copyright)
|
|
|
|
vcpkg_copy_pdbs()
|