summaryrefslogtreecommitdiffstats
path: root/src/jaegertracing/opentelemetry-cpp/cmake/opentelemetry-cpp-config.cmake.in
blob: 34549d468fd8386bf2e072f445da730c9f31f4ab (plain)
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
#.rst:
# opentelemetry-cpp-config.cmake
# --------
#
# Find the native opentelemetry-cpp includes and library.
#
#
# Result Variables
# ^^^^^^^^^^^^^^^^
#
# This module defines the following variables:
#
# ::
#
#   OPENTELEMETRY_CPP_INCLUDE_DIRS  - Include directories of opentelemetry-cpp.
#   OPENTELEMETRY_CPP_LIBRARY_DIRS  - Link directories of opentelemetry-cpp.
#   OPENTELEMETRY_CPP_LIBRARIES     - List of libraries when using opentelemetry-cpp.
#   OPENTELEMETRY_CPP_FOUND         - True if opentelemetry-cpp found.
#   OPENTELEMETRY_ABI_VERSION_NO    - ABI version of opentelemetry-cpp.
#   OPENTELEMETRY_VERSION           - Version of opentelemetry-cpp.
#
# ::
#   opentelemetry-cpp::api                            - Imported target of opentelemetry-cpp::api
#   opentelemetry-cpp::sdk                            - Imported target of opentelemetry-cpp::sdk
#   opentelemetry-cpp::ext                            - Imported target of opentelemetry-cpp::ext
#   opentelemetry-cpp::version                        - Imported target of opentelemetry-cpp::version
#   opentelemetry-cpp::common                         - Imported target of opentelemetry-cpp::common
#   opentelemetry-cpp::trace                          - Imported target of opentelemetry-cpp::trace
#   opentelemetry-cpp::metrics                        - Imported target of opentelemetry-cpp::metrics
#   opentelemetry-cpp::logs                           - Imported target of opentelemetry-cpp::logs
#   opentelemetry-cpp::in_memory_span_exporter        - Imported target of opentelemetry-cpp::in_memory_span_exporter
#   opentelemetry-cpp::otlp_recordable                - Imported target of opentelemetry-cpp::otlp_recordable
#   opentelemetry-cpp::otlp_grpc_exporter             - Imported target of opentelemetry-cpp::otlp_grpc_exporter
#   opentelemetry-cpp::otlp_grpc_log_exporter         - Imported target of opentelemetry-cpp::otlp_grpc_log_exporter
#   opentelemetry-cpp::otlp_http_client               - Imported target of opentelemetry-cpp::otlp_http_client
#   opentelemetry-cpp::otlp_http_exporter             - Imported target of opentelemetry-cpp::otlp_http_exporter
#   opentelemetry-cpp::otlp_http_log_exporter         - Imported target of opentelemetry-cpp::otlp_http_log_exporter
#   opentelemetry-cpp::ostream_log_exporter           - Imported target of opentelemetry-cpp::ostream_log_exporter
#   opentelemetry-cpp::ostream_metrics_exporter       - Imported target of opentelemetry-cpp::ostream_metrics_exporter
#   opentelemetry-cpp::ostream_span_exporter          - Imported target of opentelemetry-cpp::ostream_span_exporter
#   opentelemetry-cpp::prometheus_exporter_deprecated - Imported target of opentelemetry-cpp::prometheus_exporter_deprecated
#   opentelemetry-cpp::elasticsearch_log_exporter     - Imported target of opentelemetry-cpp::elasticsearch_log_exporter
#   opentelemetry-cpp::etw_exporter                   - Imported target of opentelemetry-cpp::etw_exporter
#   opentelemetry-cpp::jaeger_trace_exporter          - Imported target of opentelemetry-cpp::jaeger_trace_exporter
#   opentelemetry-cpp::zpages                         - Imported target of opentelemetry-cpp::zpages
#   opentelemetry-cpp::http_client_curl               - Imported target of opentelemetry-cpp::http_client_curl
#

# =============================================================================
# Copyright 2020 opentelemetry.
#
# Distributed under the Apache License (the "License"); see accompanying file
# LICENSE for details.
# =============================================================================

set(OPENTELEMETRY_ABI_VERSION_NO
    "@OPENTELEMETRY_ABI_VERSION_NO@"
    CACHE STRING "opentelemetry-cpp ABI version" FORCE)
set(OPENTELEMETRY_VERSION
    "@OPENTELEMETRY_VERSION@"
    CACHE STRING "opentelemetry-cpp version" FORCE)

@PACKAGE_INIT@

# ##############################################################################

find_package(Threads)

set_and_check(OPENTELEMETRY_CPP_INCLUDE_DIRS "@PACKAGE_INCLUDE_INSTALL_DIR@")
set_and_check(OPENTELEMETRY_CPP_LIBRARY_DIRS "@PACKAGE_CMAKE_INSTALL_LIBDIR@")

include("${CMAKE_CURRENT_LIST_DIR}/@PROJECT_NAME@-target.cmake")

set(OPENTELEMETRY_CPP_LIBRARIES)
set(_OPENTELEMETRY_CPP_LIBRARIES_TEST_TARGETS
    api
    sdk
    ext
    version
    common
    trace
    metrics
    logs
    in_memory_span_exporter
    otlp_recordable
    otlp_grpc_exporter
    otlp_http_client
    otlp_http_exporter
    otlp_http_log_exporter
    ostream_log_exporter
    ostream_metrics_exporter
    ostream_span_exporter
    prometheus_exporter
    elasticsearch_log_exporter
    etw_exporter
    jaeger_trace_exporter
    zpages
    http_client_curl)
foreach(_TEST_TARGET IN LISTS _OPENTELEMETRY_CPP_LIBRARIES_TEST_TARGETS)
  if(TARGET opentelemetry-cpp::${_TEST_TARGET})
    list(APPEND OPENTELEMETRY_CPP_LIBRARIES opentelemetry-cpp::${_TEST_TARGET})
  endif()
endforeach()

# handle the QUIETLY and REQUIRED arguments and set opentelemetry-cpp_FOUND to
# TRUE if all variables listed contain valid results, e.g. valid file paths.
include("FindPackageHandleStandardArgs")
find_package_handle_standard_args(
  ${CMAKE_FIND_PACKAGE_NAME}
  FOUND_VAR ${CMAKE_FIND_PACKAGE_NAME}_FOUND
  REQUIRED_VARS OPENTELEMETRY_CPP_INCLUDE_DIRS OPENTELEMETRY_CPP_LIBRARIES)