diff options
| author | Ethan Morgan <ethan@gweithio.com> | 2026-02-14 16:44:06 +0000 |
|---|---|---|
| committer | Ethan Morgan <ethan@gweithio.com> | 2026-02-14 16:44:06 +0000 |
| commit | 54409423f767d8b1cf30cb7d0efca6b4ca138823 (patch) | |
| tree | d915ac7828703ce4b963efdd9728a1777ba18c1e /vcpkg/ports/clickhouse-cpp | |
Diffstat (limited to 'vcpkg/ports/clickhouse-cpp')
| -rw-r--r-- | vcpkg/ports/clickhouse-cpp/fix-deps-and-build-type.patch | 60 | ||||
| -rw-r--r-- | vcpkg/ports/clickhouse-cpp/portfile.cmake | 37 | ||||
| -rw-r--r-- | vcpkg/ports/clickhouse-cpp/vcpkg.json | 25 |
3 files changed, 122 insertions, 0 deletions
diff --git a/vcpkg/ports/clickhouse-cpp/fix-deps-and-build-type.patch b/vcpkg/ports/clickhouse-cpp/fix-deps-and-build-type.patch new file mode 100644 index 0000000..f5a7407 --- /dev/null +++ b/vcpkg/ports/clickhouse-cpp/fix-deps-and-build-type.patch @@ -0,0 +1,60 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 24b71ba..5cd7446 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -78,28 +78,28 @@ IF (CLANG_WITH_LIB_STDCXX) + ENDIF () + + IF (WITH_SYSTEM_ABSEIL) +- FIND_PACKAGE(absl REQUIRED) ++ FIND_PACKAGE(absl CONFIG REQUIRED) + ELSE () + INCLUDE_DIRECTORIES (contrib/absl) + SUBDIRS (contrib/absl/absl) + ENDIF () + + IF (WITH_SYSTEM_LZ4) +- FIND_PACKAGE(lz4 REQUIRED) ++ FIND_PACKAGE(lz4 CONFIG REQUIRED) + ELSE () + INCLUDE_DIRECTORIES (contrib/lz4/lz4) + SUBDIRS (contrib/lz4/lz4) + ENDIF () + + IF (WITH_SYSTEM_CITYHASH) +- FIND_PACKAGE(cityhash REQUIRED) ++ FIND_PACKAGE(cityhash CONFIG REQUIRED) + ELSE () + INCLUDE_DIRECTORIES (contrib/cityhash/cityhash) + SUBDIRS (contrib/cityhash/cityhash) + ENDIF () + + IF (WITH_SYSTEM_ZSTD) +- FIND_PACKAGE(zstd REQUIRED) ++ FIND_PACKAGE(zstd CONFIG REQUIRED) + ELSE () + INCLUDE_DIRECTORIES (contrib/zstd/zstd) + SUBDIRS (contrib/zstd/zstd) +@@ -153,5 +153,5 @@ if(DEBUG_DEPENDENCIES) + print_target_debug_info(absl::int128) + print_target_debug_info(cityhash::cityhash) + print_target_debug_info(lz4::lz4) +- print_target_debug_info(zstd::zstd) ++ print_target_debug_info(zstd::libzstd) + endif() +diff --git a/clickhouse/CMakeLists.txt b/clickhouse/CMakeLists.txt +index 7669420..9a566ec 100644 +--- a/clickhouse/CMakeLists.txt ++++ b/clickhouse/CMakeLists.txt +@@ -111,9 +111,9 @@ SET_TARGET_PROPERTIES (clickhouse-cpp-lib + ) + TARGET_LINK_LIBRARIES (clickhouse-cpp-lib + absl::int128 +- cityhash::cityhash ++ cityhash + lz4::lz4 +- zstd::zstd ++ zstd::libzstd + ) + TARGET_INCLUDE_DIRECTORIES (clickhouse-cpp-lib + PUBLIC ${PROJECT_SOURCE_DIR} diff --git a/vcpkg/ports/clickhouse-cpp/portfile.cmake b/vcpkg/ports/clickhouse-cpp/portfile.cmake new file mode 100644 index 0000000..77bb34b --- /dev/null +++ b/vcpkg/ports/clickhouse-cpp/portfile.cmake @@ -0,0 +1,37 @@ +if(VCPKG_TARGET_IS_WINDOWS) + vcpkg_check_linkage(ONLY_STATIC_LIBRARY) +endif() + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO ClickHouse/clickhouse-cpp + REF "v${VERSION}" + SHA512 4199ac2848b0544a2a9c4e03ca62f9a14e13652b09df62b2c95eda59c567cb8227099b9cb027f18d7bdb3a25ee41f01301a551f1bf98727bf89766f5e1cac3f5 + HEAD_REF master + PATCHES + fix-deps-and-build-type.patch +) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + openssl WITH_OPENSSL +) + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS + ${FEATURE_OPTIONS} + -DWITH_SYSTEM_ABSEIL=ON + -DWITH_SYSTEM_LZ4=ON + -DWITH_SYSTEM_CITYHASH=ON + -DWITH_SYSTEM_ZSTD=ON + -DDEBUG_DEPENDENCIES=OFF +) + +vcpkg_cmake_install() +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") + +file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/vcpkg/ports/clickhouse-cpp/vcpkg.json b/vcpkg/ports/clickhouse-cpp/vcpkg.json new file mode 100644 index 0000000..be2fe87 --- /dev/null +++ b/vcpkg/ports/clickhouse-cpp/vcpkg.json @@ -0,0 +1,25 @@ +{ + "name": "clickhouse-cpp", + "version": "2.6.0", + "description": "C++ client for Yandex ClickHouse", + "homepage": "https://github.com/ClickHouse/clickhouse-cpp", + "license": "Apache-2.0", + "dependencies": [ + "abseil", + "cityhash", + "lz4", + { + "name": "vcpkg-cmake", + "host": true + }, + "zstd" + ], + "features": { + "openssl": { + "description": "Enable OpenSSL support", + "dependencies": [ + "openssl" + ] + } + } +} |