Skip to content

Conversation

dbarker
Copy link
Member

@dbarker dbarker commented May 14, 2025

This is a proof of concept for adding a top level CMakeLists.txt file to this repo in order to create a versioned opentelemetry-cpp-contrib package with components.

Goals:

  1. Support building a separate versioned opentelemetry-cpp-contrib package that depends on opentelmetry-cpp
  2. Support two options for the opentelemetry-cpp dependency:
    • Option 1: Use find_package to import an installed opentelemetry-cpp package
    • Option 2: Fetch opentelemetry-cpp from the git repo (or git submodule) and build it together with opentelemetry-cpp-contrib in a single build tree
  3. Enable creating independent components for install and import with their own third party dependencies
    • Finding like so: find_package(opentelemetry-cpp-contrib COMPONENTS exporters_geneva_metrics)

This requires some minor changes to the opentelemetry-cpp cmake install functions for general use included in this branch.
open-telemetry/opentelemetry-cpp@main...dbarker:opentelemetry-cpp:poc_otel_cmake_external_repo_support

Posting here for discussion.

@dbarker dbarker added the pr:do-not-merge This pr is not ready to be merged label May 14, 2025
…rib specific config.cmake template. Simplify component cmake and remove the MAIN_PROJECT conditionals
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr:do-not-merge This pr is not ready to be merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant