vcpkg/ports/amqpcpp/portfile.cmake

35 lines
946 B
CMake
Raw Normal View History

include(vcpkg_common_functions)
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO CopernicaMarketingSoftware/AMQP-CPP
REF v4.1.4
SHA512 d589756ad8e27ce6b6772128479083293c4dbb8c7aa79b7b08f0036ced9ab76ecb75e55458f04de8e2745c9732a6322f4e910f3f8611633c5cd5c35fb7dcaed1
HEAD_REF master
PATCHES
find-openssl.patch
)
if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Linux")
set(LINUX_TCP ON)
else()
set(LINUX_TCP OFF)
endif()
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
OPTIONS
-DAMQP-CPP_BUILD_SHARED=OFF
-DAMQP-CPP_LINUX_TCP=${LINUX_TCP}
)
vcpkg_install_cmake()
vcpkg_fixup_cmake_targets(CONFIG_PATH cmake)
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/amqpcpp RENAME copyright)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)