Skip to content

Modernize CMake build and package installation#7

Merged
KunoVonHagen merged 12 commits into
mainfrom
feature/export-as-package
Jul 9, 2026
Merged

Modernize CMake build and package installation#7
KunoVonHagen merged 12 commits into
mainfrom
feature/export-as-package

Conversation

@KunoVonHagen

Copy link
Copy Markdown
Collaborator

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_cpp library. It also standardizes header inclusion in test files and updates the versioning. The most important changes are grouped below:

Build system and packaging modernization

  • Refactored CMakeLists.txt to build and install fluvio_client_cpp as 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.
  • Added a CMake package config template (cmake/fluvio_client_cppConfig.cmake.in) and corresponding installation logic, enabling downstream CMake projects to easily find and use the library. [1] [2]
  • Removed the old fluvio_client_cppConfig.cmake which manually set up an imported target, in favor of the new generated CMake config system.

Source and header organization

  • Introduced a new umbrella header fluvio_client_cpp/fluvio_client_cpp.hpp to simplify includes for consumers and test files.
  • Updated all C++ test files to include the new umbrella header via the installed path, and updated C test files to use the new C header path. This ensures consistency and prepares the project for installation and consumption as a package. [1] [2] [3] [4] [5] [6] [7]

Versioning

  • Bumped the crate version in Cargo.toml from 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-cpp library. 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:

  • Refactored CMakeLists.txt to create and install a proper fluvio_client_cpp static 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]
  • Added cmake/fluvio_client_cppConfig.cmake.in to generate the CMake package config, and removed the old, hardcoded fluvio_client_cppConfig.cmake. [1] [2]
  • Bumped the crate version to 0.2.0 in Cargo.toml to reflect these breaking and structural changes.

Public API and Test Cleanup:

  • Added a new umbrella header fluvio_client_cpp/fluvio_client_cpp.hpp to 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]
  • Updated C test files to use the correct installed C API header path. [1] [2]

Documentation and Usage:

  • Updated the README.md to 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.

@KunoVonHagen KunoVonHagen self-assigned this Jul 9, 2026
@KunoVonHagen KunoVonHagen added the enhancement New feature or request label Jul 9, 2026

@stefanDeveloper stefanDeveloper left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All good

@KunoVonHagen KunoVonHagen merged commit 7e156a6 into main Jul 9, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants