2
0

patch-imported-config.cmake 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144
  1. # Copyright The OpenTelemetry Authors
  2. # SPDX-License-Identifier: Apache-2.0
  3. # Some prebuilt or installed targets may have different CONFIG settings than
  4. # what we use to configure otel-cpp. This file applies patches to the imported
  5. # targets in order to use compatible CONFIG settings for fallback.
  6. # Common dependencies
  7. project_build_tools_patch_default_imported_config(ZLIB::ZLIB)
  8. # protobuf targets
  9. if(Protobuf_FOUND)
  10. project_build_tools_patch_default_imported_config(
  11. utf8_range::utf8_range utf8_range::utf8_validity protobuf::libprotobuf-lite
  12. protobuf::libprotobuf protobuf::libprotoc)
  13. endif()
  14. # cares targets
  15. if(TARGET c-ares::cares)
  16. project_build_tools_patch_default_imported_config(c-ares::cares)
  17. endif()
  18. # curl targets
  19. if(TARGET CURL::libcurl
  20. OR TARGET CURL::libcurl_static
  21. OR TARGET CURL::libcurl_shared)
  22. project_build_tools_patch_default_imported_config(
  23. CURL::libcurl CURL::libcurl_static CURL::libcurl_shared)
  24. endif()
  25. # abseil targets
  26. if(TARGET absl::bad_variant_access)
  27. project_build_tools_patch_default_imported_config(
  28. absl::bad_variant_access
  29. absl::raw_logging_internal
  30. absl::log_severity
  31. absl::log_internal_check_op
  32. absl::log_internal_nullguard
  33. absl::strings
  34. absl::strings_internal
  35. absl::base
  36. absl::spinlock_wait
  37. absl::int128
  38. absl::throw_delegate
  39. absl::log_internal_message
  40. absl::examine_stack
  41. absl::stacktrace
  42. absl::debugging_internal
  43. absl::symbolize
  44. absl::demangle_internal
  45. absl::malloc_internal
  46. absl::log_internal_format
  47. absl::log_internal_globals
  48. absl::time
  49. absl::civil_time
  50. absl::time_zone
  51. absl::str_format_internal
  52. absl::log_internal_proto
  53. absl::log_internal_log_sink_set
  54. absl::log_globals
  55. absl::hash
  56. absl::city
  57. absl::bad_optional_access
  58. absl::low_level_hash
  59. absl::log_entry
  60. absl::log_sink
  61. absl::synchronization
  62. absl::graphcycles_internal
  63. absl::strerror
  64. absl::log_internal_conditions
  65. absl::cord
  66. absl::cord_internal
  67. absl::crc_cord_state
  68. absl::crc32c
  69. absl::crc_cpu_detect
  70. absl::crc_internal
  71. absl::cordz_functions
  72. absl::exponential_biased
  73. absl::cordz_info
  74. absl::cordz_handle
  75. absl::leak_check
  76. absl::die_if_null
  77. absl::flags
  78. absl::flags_commandlineflag
  79. absl::flags_commandlineflag_internal
  80. absl::flags_config
  81. absl::flags_program_name
  82. absl::flags_internal
  83. absl::flags_marshalling
  84. absl::flags_reflection
  85. absl::flags_private_handle_accessor
  86. absl::raw_hash_set
  87. absl::hashtablez_sampler
  88. absl::log_initialize
  89. absl::status
  90. absl::statusor)
  91. endif()
  92. # gRPC targets
  93. if(TARGET gRPC::grpc++)
  94. project_build_tools_patch_default_imported_config(
  95. gRPC::cares
  96. gRPC::re2
  97. gRPC::ssl
  98. gRPC::crypto
  99. gRPC::zlibstatic
  100. gRPC::address_sorting
  101. gRPC::gpr
  102. gRPC::grpc
  103. gRPC::grpc_unsecure
  104. gRPC::grpc++
  105. gRPC::grpc++_alts
  106. gRPC::grpc++_error_details
  107. gRPC::grpc++_reflection
  108. gRPC::grpc++_unsecure
  109. gRPC::grpc_authorization_provider
  110. gRPC::grpc_plugin_support
  111. gRPC::grpcpp_channelz
  112. gRPC::upb)
  113. endif()
  114. # prometheus targets
  115. if(TARGET prometheus-cpp::core)
  116. project_build_tools_patch_default_imported_config(
  117. prometheus-cpp::core prometheus-cpp::pull prometheus-cpp::push)
  118. endif()
  119. # civetweb targets
  120. if(TARGET civetweb::civetweb)
  121. project_build_tools_patch_default_imported_config(
  122. civetweb::civetweb civetweb::server civetweb::civetweb-cpp)
  123. endif()
  124. if(BUILD_TESTING)
  125. project_build_tools_patch_default_imported_config(
  126. GTest::gtest
  127. GTest::gtest_main
  128. GTest::gmock
  129. GTest::gmock_main
  130. GTest::GTest
  131. GTest::Main
  132. benchmark::benchmark
  133. benchmark::benchmark_main)
  134. endif()