zookeeper-cpp
zookeeper-cpp copied to clipboard
Document zookeeper-cpp CMake integration
While this project is great, it lacks documentation about how to integrate it into others CMake projects as dependency. (My bad if it already exists somewhere else, so my point would be that it should be placed in the README.md)
A few samples should do the tricks :
-
FetchContent(simple project add_dependency+target_link_library) - Compilation options (ZKPP_BUILD_SETTINGS_BUFFER, ZKPP_BUILD_SETTINGS_FUTURE, etc.)
- How to build (or exclude from build) specific targets : tests, server, etc.
Really need some CMake's option directive to select which target are about to be part of the build, and which not.
For instance, some projects which depends on Zookeeper-cpp may only depends on the client.
In order to to this, and get a way cleaner build, I strongly advise you to create a subdirectory + CMakeLists.txt per target, for instance :
zookeeper-cpp
+- includes/zookeeper-cpp/*.hpp -> common impls
+- includes/zookeeper-cpp/client/*.hpp
+- includes/zookeeper-cpp/server/*.hpp
+- sources
+- server/CMakeLists.txt -> zkpp-server target
+- client -> zkpp-client target
+- tests
+- server -> zkpp-server-test target
+- client -> zkpp-client-test target