File: thirdparty-dependency-config.cmake

package info (click to toggle)
opentelemetry-cpp 1.23.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 11,372 kB
  • sloc: cpp: 96,239; sh: 1,766; makefile: 36; python: 31
file content (48 lines) | stat: -rw-r--r-- 2,119 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# Copyright The OpenTelemetry Authors
# SPDX-License-Identifier: Apache-2.0

#-----------------------------------------------------------------------
# Third party dependencies supported by opentelemetry-cpp
# Dependencies that must be found with find_dependency() when a user calls find_package(opentelemetry-cpp ...)
# should be included in this list.
#-----------------------------------------------------------------------
set(OTEL_THIRDPARTY_DEPENDENCIES_SUPPORTED
     Threads
     Microsoft.GSL
     ZLIB
     CURL
     nlohmann_json
     Protobuf
     gRPC
     prometheus-cpp
     OpenTracing
)

#-----------------------------------------------------------------------
# Third party dependency target namespaces. Defaults to the dependency's project name if not set.
# Only set if the target namespace is different from the project name (these are case sensitive).
# set(OTEL_<dependency>_TARGET_NAMESPACE "<namespace>")
#-----------------------------------------------------------------------
set(OTEL_Protobuf_TARGET_NAMESPACE "protobuf")

#-----------------------------------------------------------------------
# Set the find_dependecy search mode - empty is default. Options: cmake default (empty string ""), "MODULE", or "CONFIG"
# # set(OTEL_<dependency>_SEARCH_MODE "<search mode>")
#-----------------------------------------------------------------------
set(OTEL_Threads_SEARCH_MODE "")
set(OTEL_Microsoft.GSL_SEARCH_MODE "CONFIG")
set(OTEL_ZLIB_SEARCH_MODE "")
set(OTEL_CURL_SEARCH_MODE "")
set(OTEL_nlohmann_json_SEARCH_MODE "CONFIG")
set(OTEL_gRPC_SEARCH_MODE "CONFIG")
set(OTEL_prometheus-cpp_SEARCH_MODE "CONFIG")
set(OTEL_OpenTracing_SEARCH_MODE "CONFIG")

# The search mode is set to "CONFIG" for Protobuf versions >= 3.22.0
# to find Protobuf's abseil dependency properly until the FindProtobuf module is updated support the upstream protobuf-config.cmake.
# See https://gitlab.kitware.com/cmake/cmake/-/issues/24321
if(DEFINED Protobuf_VERSION AND Protobuf_VERSION VERSION_GREATER_EQUAL 3.22.0)
    set(OTEL_Protobuf_SEARCH_MODE "CONFIG")
else()
    set(OTEL_Protobuf_SEARCH_MODE "")
endif()