2019-03-11 17:59:31 +08:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
2024-07-11 15:51:37 +00:00
|
|
|
REPO confluentinc/librdkafka
|
2023-05-05 20:12:49 +02:00
|
|
|
REF "v${VERSION}"
|
2024-10-11 22:31:45 +08:00
|
|
|
SHA512 420cad9650f468528012133398facf0edccb8442b2613d347aa81fbe638f6f47e584372e2c7d420dfe061ba10ad713d0addd7847bafe6c700bd450408153473e
|
2019-03-11 17:59:31 +08:00
|
|
|
HEAD_REF master
|
2022-07-01 11:10:23 -07:00
|
|
|
PATCHES
|
|
|
|
lz4.patch
|
2019-03-11 17:59:31 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" RDKAFKA_BUILD_STATIC)
|
|
|
|
|
2019-08-13 20:13:55 -07:00
|
|
|
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
2021-05-18 09:45:48 +02:00
|
|
|
FEATURES
|
2024-08-02 14:30:39 -04:00
|
|
|
curl WITH_CURL
|
|
|
|
sasl WITH_SASL
|
|
|
|
sasl WITH_SASL_CYRUS
|
2021-11-04 20:17:46 +01:00
|
|
|
ssl WITH_SSL
|
2024-06-12 18:16:32 -05:00
|
|
|
ssl WITH_SASL_OAUTHBEARER
|
|
|
|
ssl WITH_SASL_SCRAM
|
2021-11-04 20:17:46 +01:00
|
|
|
zlib WITH_ZLIB
|
|
|
|
zstd WITH_ZSTD
|
2019-07-02 18:30:56 +08:00
|
|
|
)
|
2019-04-30 18:28:17 +08:00
|
|
|
|
2021-11-04 20:17:46 +01:00
|
|
|
vcpkg_cmake_configure(
|
2022-07-01 11:10:23 -07:00
|
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
2019-03-11 17:59:31 +08:00
|
|
|
OPTIONS
|
|
|
|
-DRDKAFKA_BUILD_STATIC=${RDKAFKA_BUILD_STATIC}
|
|
|
|
-DRDKAFKA_BUILD_EXAMPLES=OFF
|
2019-05-28 08:21:20 +08:00
|
|
|
-DRDKAFKA_BUILD_TESTS=OFF
|
2019-04-07 20:13:27 +08:00
|
|
|
-DWITH_BUNDLED_SSL=OFF
|
2019-07-02 18:30:56 +08:00
|
|
|
${FEATURE_OPTIONS}
|
2019-03-11 17:59:31 +08:00
|
|
|
OPTIONS_DEBUG
|
2021-11-04 20:17:46 +01:00
|
|
|
-DENABLE_SHAREDPTR_DEBUG=ON
|
2019-03-11 17:59:31 +08:00
|
|
|
-DENABLE_DEVEL=ON
|
2022-03-17 05:32:59 +08:00
|
|
|
-DENABLE_REFCNT_DEBUG=OFF
|
2019-03-11 17:59:31 +08:00
|
|
|
-DENABLE_SHAREDPTR_DEBUG=ON
|
2019-04-03 18:50:39 +08:00
|
|
|
-DWITHOUT_OPTIMIZATION=ON
|
2019-03-11 17:59:31 +08:00
|
|
|
OPTIONS_RELEASE
|
2021-11-04 20:17:46 +01:00
|
|
|
-DENABLE_SHAREDPTR_DEBUG=OFF
|
2019-03-11 17:59:31 +08:00
|
|
|
-DENABLE_DEVEL=OFF
|
|
|
|
-DENABLE_REFCNT_DEBUG=OFF
|
|
|
|
-DENABLE_SHAREDPTR_DEBUG=OFF
|
2019-04-03 18:50:39 +08:00
|
|
|
-DWITHOUT_OPTIMIZATION=OFF
|
2019-03-11 17:59:31 +08:00
|
|
|
)
|
|
|
|
|
2021-11-04 20:17:46 +01:00
|
|
|
vcpkg_cmake_install()
|
2019-03-11 17:59:31 +08:00
|
|
|
|
|
|
|
vcpkg_copy_pdbs()
|
|
|
|
|
2024-07-25 22:34:56 +02:00
|
|
|
vcpkg_cmake_config_fixup(CONFIG_PATH "lib/cmake/RdKafka" PACKAGE_NAME "rdkafka")
|
2019-03-11 17:59:31 +08:00
|
|
|
|
|
|
|
file(REMOVE_RECURSE
|
2022-03-17 05:32:59 +08:00
|
|
|
"${CURRENT_PACKAGES_DIR}/debug/include"
|
|
|
|
"${CURRENT_PACKAGES_DIR}/debug/share"
|
2024-07-25 22:34:56 +02:00
|
|
|
"${CURRENT_PACKAGES_DIR}/share/rdkafka/FindLZ4.cmake"
|
2019-03-11 17:59:31 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
|
|
|
|
foreach(hdr rdkafka.h rdkafkacpp.h)
|
|
|
|
vcpkg_replace_string(
|
2022-03-17 05:32:59 +08:00
|
|
|
"${CURRENT_PACKAGES_DIR}/include/librdkafka/${hdr}"
|
2019-03-11 17:59:31 +08:00
|
|
|
"#ifdef LIBRDKAFKA_STATICLIB"
|
|
|
|
"#if 1 // #ifdef LIBRDKAFKA_STATICLIB"
|
|
|
|
)
|
|
|
|
endforeach()
|
|
|
|
endif()
|
|
|
|
|
|
|
|
# Handle copyright
|
2024-07-16 13:14:08 +00:00
|
|
|
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSES.txt" )
|
2019-05-07 08:13:10 +08:00
|
|
|
|
|
|
|
# Install usage
|
2022-03-17 05:32:59 +08:00
|
|
|
configure_file("${CMAKE_CURRENT_LIST_DIR}/usage" "${CURRENT_PACKAGES_DIR}/share/${PORT}/usage" @ONLY)
|
2021-11-04 20:17:46 +01:00
|
|
|
|
|
|
|
vcpkg_fixup_pkgconfig()
|