aboutsummaryrefslogtreecommitdiff
path: root/vcpkg/ports/cppkafka
diff options
context:
space:
mode:
authorEthan Morgan <ethan@gweithio.com>2026-02-14 16:44:06 +0000
committerEthan Morgan <ethan@gweithio.com>2026-02-14 16:44:06 +0000
commit54409423f767d8b1cf30cb7d0efca6b4ca138823 (patch)
treed915ac7828703ce4b963efdd9728a1777ba18c1e /vcpkg/ports/cppkafka
move to own git serverHEADmaster
Diffstat (limited to 'vcpkg/ports/cppkafka')
-rw-r--r--vcpkg/ports/cppkafka/portfile.cmake44
-rw-r--r--vcpkg/ports/cppkafka/vcpkg.json19
2 files changed, 63 insertions, 0 deletions
diff --git a/vcpkg/ports/cppkafka/portfile.cmake b/vcpkg/ports/cppkafka/portfile.cmake
new file mode 100644
index 0000000..a9f27b4
--- /dev/null
+++ b/vcpkg/ports/cppkafka/portfile.cmake
@@ -0,0 +1,44 @@
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO mfontanini/cppkafka
+ REF "v${VERSION}"
+ SHA512 dce4da452cb98d854714a0ab7ab5e85a078d5e1c023c05344ea1a63d08112c25d32a6209bc29cfbaefc2b26abfab02e72081baa68528a23ec610c208f4d34d9f
+ HEAD_REF master
+)
+
+if (VCPKG_LIBRARY_LINKAGE STREQUAL "static")
+ set(CPPKAFKA_BUILD_SHARED OFF)
+ set(CPPKAFKA_RDKAFKA_STATIC_LIB ON)
+else()
+ set(CPPKAFKA_BUILD_SHARED ON)
+ set(CPPKAFKA_RDKAFKA_STATIC_LIB OFF)
+endif()
+
+vcpkg_cmake_configure(
+ SOURCE_PATH "${SOURCE_PATH}"
+ DISABLE_PARALLEL_CONFIGURE
+ OPTIONS
+ -DCMAKE_CXX_STANDARD=11
+ -DCPPKAFKA_BUILD_SHARED=${CPPKAFKA_BUILD_SHARED}
+ -DCPPKAFKA_DISABLE_TESTS=ON
+ -DCPPKAFKA_DISABLE_EXAMPLES=ON
+ -DCPPKAFKA_PKGCONFIG_DIR=lib/pkgconfig
+ -DCPPKAFKA_RDKAFKA_STATIC_LIB=${CPPKAFKA_RDKAFKA_STATIC_LIB}
+)
+
+vcpkg_cmake_install()
+
+vcpkg_copy_pdbs()
+
+vcpkg_cmake_config_fixup(
+ CONFIG_PATH lib/cmake/CppKafka
+)
+
+file(REMOVE_RECURSE
+ "${CURRENT_PACKAGES_DIR}/debug/include"
+ "${CURRENT_PACKAGES_DIR}/debug/share"
+)
+
+# Handle copyright
+vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")
+vcpkg_fixup_pkgconfig()
diff --git a/vcpkg/ports/cppkafka/vcpkg.json b/vcpkg/ports/cppkafka/vcpkg.json
new file mode 100644
index 0000000..732f0fb
--- /dev/null
+++ b/vcpkg/ports/cppkafka/vcpkg.json
@@ -0,0 +1,19 @@
+{
+ "name": "cppkafka",
+ "version": "0.4.1",
+ "description": "cppkafka allows C++ applications to consume and produce messages using the Apache Kafka protocol. The library is built on top of librdkafka, and provides a high level API that uses modern C++ features to make it easier to write code while keeping the wrapper's performance overhead to a minimum.",
+ "homepage": "https://github.com/mfontanini/cppkafka",
+ "license": "BSD-2-Clause",
+ "dependencies": [
+ "boost-program-options",
+ "librdkafka",
+ {
+ "name": "vcpkg-cmake",
+ "host": true
+ },
+ {
+ "name": "vcpkg-cmake-config",
+ "host": true
+ }
+ ]
+}