Modernize CMake build and package installation#7
Merged
Conversation
… and generated files
…against fluvio_client_cpp
…y to downstream repos
…ernative CMake FetchContent method
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request makes significant improvements to the C++ client build and packaging system, transitioning to a modern CMake-based approach for building, linking, and installing the
fluvio_client_cpplibrary. It also standardizes header inclusion in test files and updates the versioning. The most important changes are grouped below:Build system and packaging modernization
CMakeLists.txtto build and installfluvio_client_cppas a proper CMake static library, generate and install headers, and provide CMake package configuration for consumers. This includes creating an alias target, using generated include directories, and setting up installation rules for headers, libraries, and CMake config files.cmake/fluvio_client_cppConfig.cmake.in) and corresponding installation logic, enabling downstream CMake projects to easily find and use the library. [1] [2]fluvio_client_cppConfig.cmakewhich manually set up an imported target, in favor of the new generated CMake config system.Source and header organization
fluvio_client_cpp/fluvio_client_cpp.hppto simplify includes for consumers and test files.Versioning
Cargo.tomlfrom 0.1.0 to 0.2.0 to reflect these breaking and structural changes.This pull request introduces significant improvements to the build system, packaging, and public API of the
fluvio-client-cpplibrary. The main changes include refactoring the CMake build to properly generate and install the C++ library and headers, updating the usage and installation instructions, and cleaning up the test code to use the new public API. The version is also bumped to 0.2.0.Build System and Packaging Improvements:
CMakeLists.txtto create and install a properfluvio_client_cppstatic library, generate and install headers, and provide CMake package configuration files for downstream consumers. All tests now link against the installed library instead of directly using generated sources/headers. [1] [2]cmake/fluvio_client_cppConfig.cmake.into generate the CMake package config, and removed the old, hardcodedfluvio_client_cppConfig.cmake. [1] [2]0.2.0inCargo.tomlto reflect these breaking and structural changes.Public API and Test Cleanup:
fluvio_client_cpp/fluvio_client_cpp.hppto expose the public API, and updated all C++ test files to include this header instead of internal generated headers. [1] [2] [3] [4] [5] [6]Documentation and Usage:
README.mdto clarify that the vcpkg port is not yet available and to recommend using CMake FetchContent for integration. Provided updated usage instructions.These changes make the library much easier to consume as a standard CMake package and clarify its public API for both C++ and C consumers.