2023-12-29 16:15:51 +08:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO apache/pulsar-client-cpp
|
|
|
|
REF "v${VERSION}"
|
2024-06-12 03:39:38 +08:00
|
|
|
SHA512 9ee1b8d057298079c58c10226dbb07676eb94a11e7aa7b725dd9e0dd4e61e0af7127cda93c8651921fbbf00b91b89e28a88fb9edf3270360886319e94f672e12
|
2023-12-29 16:15:51 +08:00
|
|
|
HEAD_REF main
|
2024-06-22 04:39:50 +08:00
|
|
|
PATCHES
|
|
|
|
disable-warnings.patch
|
2023-12-29 16:15:51 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" BUILD_STATIC_LIB)
|
|
|
|
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" BUILD_DYNAMIC_LIB)
|
|
|
|
|
|
|
|
vcpkg_cmake_configure(
|
|
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
|
|
|
OPTIONS
|
2024-06-12 03:39:38 +08:00
|
|
|
-DINTEGRATE_VCPKG=ON
|
2023-12-29 16:15:51 +08:00
|
|
|
-DBUILD_TESTS=OFF
|
|
|
|
-DBUILD_PERF_TOOLS=OFF
|
|
|
|
-DBUILD_DYNAMIC_LIB=${BUILD_DYNAMIC_LIB}
|
|
|
|
-DBUILD_STATIC_LIB=${BUILD_STATIC_LIB}
|
|
|
|
)
|
|
|
|
|
|
|
|
vcpkg_cmake_install()
|
|
|
|
|
|
|
|
if (BUILD_STATIC_LIB)
|
|
|
|
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/pulsar/defines.h"
|
|
|
|
"#ifdef PULSAR_STATIC"
|
|
|
|
"#if 1")
|
|
|
|
endif ()
|
|
|
|
|
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
|
|
|
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
|
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin")
|
|
|
|
endif()
|
|
|
|
|
|
|
|
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")
|
|
|
|
configure_file("${CMAKE_CURRENT_LIST_DIR}/usage" "${CURRENT_PACKAGES_DIR}/share/${PORT}/usage" COPYONLY)
|
|
|
|
|
|
|
|
configure_file("${CMAKE_CURRENT_LIST_DIR}/unofficial-pulsar-config.cmake" "${CURRENT_PACKAGES_DIR}/share/unofficial-pulsar/unofficial-pulsar-config.cmake" @ONLY)
|
|
|
|
|
|
|
|
vcpkg_copy_pdbs()
|