Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Support for CMake #411

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

AndreyAlifanov
Copy link
Contributor

Normal support for using library clickhouse-cpp with CMake and vcpkg added. Also some errors fixed.

Current usage of library in projects requires writing many lines of code, sush as
find_library, find_package, include_directories, target_link_libraries for all dependencies.
It's very annoying and error prune.

find_library(CLICKHOUSE_CPP libclickhouse-cpp-lib.a REQUIRED)
find_package(zstd CONFIG REQUIRED)
find_package(lz4 CONFIG REQUIRED)
find_package(cityhash CONFIG REQUIRED)

target_link_libraries(${PROJECT_NAME}
  PRIVATE
    ${CLICKHOUSE_CPP}
    zstd::libzstd_static
    lz4::lz4
    cityhash
)

With my corrections all we need is:

find_package(clickhouse-cpp CONFIG REQUIRED)
target_link_libraries(${PROJECT_NAME} PRIVATE clickhouse-cpp-lib)

@Enmk
Copy link
Collaborator

Enmk commented Feb 17, 2025

Hi @AndreyAlifanov all CI jobs have failed, could you please take a look?

@AndreyAlifanov
Copy link
Contributor Author

Hi @AndreyAlifanov all CI jobs have failed, could you please take a look?

Hi @Enmk thank you for information. All CI jobs failed with the same errors. I'll investigate reasons.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants