mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-26 22:19:00 +08:00
45 lines
1.2 KiB
CMake
45 lines
1.2 KiB
CMake
|
vcpkg_from_github(
|
||
|
OUT_SOURCE_PATH SOURCE_PATH
|
||
|
REPO awslabs/aws-c-mqtt
|
||
|
REF 0a70bf814845e487b7e4862af7ad9e4a1199b5f4 # v0.7.6
|
||
|
SHA512 9c8719004e9e4c56f270c5c5dcb41b5ecacb050dadf2a548ab2119a1a8f223c9117829346e2e86c8c77f6efe3502019085344fe4f470ccdd646dc87a3d4f4c3f
|
||
|
HEAD_REF master
|
||
|
PATCHES fix-cmake-target-path.patch
|
||
|
)
|
||
|
|
||
|
vcpkg_cmake_configure(
|
||
|
SOURCE_PATH "${SOURCE_PATH}"
|
||
|
PREFER_NINJA
|
||
|
OPTIONS
|
||
|
"-DCMAKE_MODULE_PATH=${CURRENT_INSTALLED_DIR}/share/aws-c-common" # use extra cmake files
|
||
|
)
|
||
|
|
||
|
vcpkg_cmake_install()
|
||
|
|
||
|
vcpkg_cmake_config_fixup(CONFIG_PATH lib/aws-c-mqtt/cmake)
|
||
|
|
||
|
vcpkg_copy_tools(
|
||
|
TOOL_NAMES elastipubsub
|
||
|
AUTO_CLEAN
|
||
|
)
|
||
|
|
||
|
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
|
||
|
file(REMOVE_RECURSE
|
||
|
"${CURRENT_PACKAGES_DIR}/bin"
|
||
|
"${CURRENT_PACKAGES_DIR}/debug/bin"
|
||
|
)
|
||
|
endif()
|
||
|
|
||
|
file(REMOVE_RECURSE
|
||
|
"${CURRENT_PACKAGES_DIR}/debug/include"
|
||
|
"${CURRENT_PACKAGES_DIR}/debug/lib/aws-c-mqtt"
|
||
|
"${CURRENT_PACKAGES_DIR}/lib/aws-c-mqtt"
|
||
|
)
|
||
|
|
||
|
vcpkg_copy_pdbs()
|
||
|
|
||
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
|
||
|
|
||
|
# Handle copyright
|
||
|
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|