Skip to content

Conversation

@arcolight
Copy link
Contributor

@arcolight arcolight commented Dec 23, 2025

This PR adds cmake config files suitable for the find_package() cmake routine.
This PR covers 3 different cases:

  1. C++ libraries used as dependency and built separately without install. Main project uses built libraries and headers from the dependency binary directory.
  2. C++ libraries used as dependency and build separately with install. Main project uses built libraries and headers from the specified installation directory.
  3. C++ libraries used as dependency and built as subfolder of the main cmake project.

Also INSTALL_IGNITE_FILES option removed in this PR because it does not have much sense. Installation controlled by the called target and not an option. Also, install calls needed in the cmake to generate and export cmake targets files properly.
 
Cmake config files will be added to the installation packages in the next task: https://issues.apache.org/jira/browse/IGNITE-27579

Thank you for submitting the pull request.

To streamline the review process of the patch and ensure better code quality
we ask both an author and a reviewer to verify the following:

The Review Checklist

  • Formal criteria: TC status, codestyle, mandatory documentation. Also make sure to complete the following:
    - There is a single JIRA ticket related to the pull request.
    - The web-link to the pull request is attached to the JIRA ticket.
    - The JIRA ticket has the Patch Available state.
    - The description of the JIRA ticket explains WHAT was made, WHY and HOW.
    - The pull request title is treated as the final commit message. The following pattern must be used: IGNITE-XXXX Change summary where XXXX - number of JIRA issue.
  • Design: new code conforms with the design principles of the components it is added to.
  • Patch quality: patch cannot be split into smaller pieces, its size must be reasonable.
  • Code quality: code is clean and readable, necessary developer documentation is added if needed.
  • Tests code quality: test set covers positive/negative scenarios, happy/edge cases. Tests are effective in terms of execution time and resources.

Notes

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR implements CMake package configuration support for the Apache Ignite C++ Client and ODBC libraries, enabling consumers to find and use these libraries via CMake's find_package() mechanism. The implementation includes config file generation, component-based discovery, pkg-config support, and comprehensive integration tests.

Changes:

  • Added CMake config files (ignite-config.cmake.in and ignite-config-version.cmake.in) for package discovery
  • Created pkg-config (.pc) files for both client and ODBC components
  • Modified library CMakeLists to export targets with proper namespaces and include directories
  • Added three integration test configurations to verify package discovery in different scenarios

Reviewed changes

Copilot reviewed 20 out of 20 changed files in this pull request and generated 19 comments.

Show a summary per file
File Description
modules/platforms/cpp/CMakeLists.txt Added package config generation, version file creation, and installation rules
modules/platforms/cpp/cmake/ignite-config.cmake.in Package configuration template for component-based discovery
modules/platforms/cpp/cmake/ignite-config-version.cmake.in Version compatibility template (currently unused)
modules/platforms/cpp/pkgconfig/*.pc.in Pkg-config templates for client and ODBC libraries
modules/platforms/cpp/pkgconfig/CMakeLists.txt Build rules for pkg-config file generation
modules/platforms/cpp/ignite/client/CMakeLists.txt Export configuration for client library with namespaced targets
modules/platforms/cpp/ignite/odbc/CMakeLists.txt Export configuration for ODBC library with namespaced targets
modules/platforms/cpp/ignite/common/CMakeLists.txt Updated include directory configuration for exportable targets
modules/platforms/cpp/ignite/protocol/CMakeLists.txt Changed link visibility to PUBLIC for dependencies
modules/platforms/cpp/ignite/tuple/CMakeLists.txt Removed redundant install command
modules/platforms/cpp/cmake/dependencies.cmake Fixed path reference for config file
modules/platforms/cpp/tests/package-test/*.cpp Simple linkage test programs for client and ODBC
modules/platforms/cpp/tests/package-test/*/CMakeLists.txt Test configurations for three integration scenarios
modules/platforms/cpp/tests/package-test/README.md Documentation for package tests
modules/platforms/cpp/tests/fake_server/CMakeLists.txt Added explicit msgpack-c dependency
modules/platforms/cpp/ignite/odbc/config/config_tools_test.cpp Fixed include path

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@isapego isapego merged commit af0ef0c into apache:main Jan 19, 2026
5 checks passed
@isapego isapego deleted the ignite-27263 branch January 19, 2026 16:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants