diff --git a/recipes/opentelemetry-cpp/all/conandata.yml b/recipes/opentelemetry-cpp/all/conandata.yml index 2342d2e0da093..fb4e67647e394 100644 --- a/recipes/opentelemetry-cpp/all/conandata.yml +++ b/recipes/opentelemetry-cpp/all/conandata.yml @@ -1,66 +1,13 @@ sources: + "1.12.0": + url: "https://github.com/open-telemetry/opentelemetry-cpp/archive/v1.12.0.tar.gz" + sha256: "09c208a21fb1159d114a3ea15dc1bcc5dee28eb39907ba72a6012d2c7b7564a0" "1.9.1": url: "https://github.com/open-telemetry/opentelemetry-cpp/archive/v1.9.1.tar.gz" sha256: "668de24f81c8d36d75092ad9dcb02a97cd41473adbe72485ece05e336db48249" - "1.8.1": - url: "https://github.com/open-telemetry/opentelemetry-cpp/archive/v1.8.1.tar.gz" - sha256: "3d640201594b07f08dade9cd1017bd0b59674daca26223b560b9bb6bf56264c2" + "1.8.3": + url: "https://github.com/open-telemetry/opentelemetry-cpp/archive/v1.8.3.tar.gz" + sha256: "b23d3c80d2e0012734ea343d2be69b2a7139ec5545453c503b13e629eb8fbe05" "1.7.0": url: "https://github.com/open-telemetry/opentelemetry-cpp/archive/v1.7.0.tar.gz" sha256: "2ad0911cdc94fe84a93334773bef4789a38bd1f01e39560cabd4a5c267e823c3" - "1.6.1": - url: "https://github.com/open-telemetry/opentelemetry-cpp/archive/v1.6.1.tar.gz" - sha256: "1fc371be049b3220b8b9571c8b713f03e9a84f3c5684363f64ccc814638391a5" - "1.4.1": - url: "https://github.com/open-telemetry/opentelemetry-cpp/archive/v1.4.1.tar.gz" - sha256: "301b1ab74a664723560f46c29f228360aff1e2d63e930b963755ea077ae67524" - "1.4.0": - url: "https://github.com/open-telemetry/opentelemetry-cpp/archive/refs/tags/v1.4.0.tar.gz" - sha256: "110f4fb2e38dcc72a421647631cfbb9429afd3c77c6c98829cc1d11bd0c72563" - "1.3.0": - url: "https://github.com/open-telemetry/opentelemetry-cpp/archive/refs/tags/v1.3.0.tar.gz" - sha256: "6a4c43b9c9f753841ebc0fe2717325271f02e2a1d5ddd0b52735c35243629ab3" - "1.2.0": - url: "https://github.com/open-telemetry/opentelemetry-cpp/archive/refs/tags/v1.2.0.tar.gz" - sha256: "7a6420f9e4fa44b81a5b06e30e5e116da71decc9086e5cc4f126e1efc8a397c2" - "1.0.1": - url: "https://github.com/open-telemetry/opentelemetry-cpp/archive/refs/tags/v1.0.1.tar.gz" - sha256: "32f12ff15ec257e3462883f84bc291c2d5dc30055604c12ec4b46a36dfa3f189" - -patches: - "1.9.1": - - patch_file: "patches/1.9.1-0001-fix-cmake.patch" - patch_description: "fix lack of linking libraries due to conan not generating the variables that are expected" - patch_type: "conan" - "1.8.1": - - patch_file: "patches/1.8.1-0001-fix-cmake.patch" - patch_description: "fix lack of linking libraries due to conan not generating the variables that are expected" - patch_type: "conan" - "1.7.0": - - patch_file: "patches/1.7.0-0001-fix-cmake.patch" - patch_description: "fix lack of linking libraries due to conan not generating the variables that are expected" - patch_type: "conan" - "1.6.1": - - patch_file: "patches/1.6.1-0001-fix-cmake.patch" - patch_description: "fix lack of linking libraries due to conan not generating the variables that are expected" - patch_type: "conan" - "1.4.1": - - patch_file: "patches/1.4.0-0001-fix-cmake.patch" - patch_description: "fix lack of linking libraries due to conan not generating the variables that are expected" - patch_type: "conan" - "1.4.0": - - patch_file: "patches/1.4.0-0001-fix-cmake.patch" - patch_description: "fix lack of linking libraries due to conan not generating the variables that are expected" - patch_type: "conan" - "1.3.0": - - patch_file: "patches/1.3.0-0001-fix-cmake.patch" - patch_description: "fix lack of linking libraries due to conan not generating the variables that are expected" - patch_type: "conan" - "1.2.0": - - patch_file: "patches/1.2.0-0001-fix-cmake.patch" - patch_description: "fix lack of linking libraries due to conan not generating the variables that are expected" - patch_type: "conan" - "1.0.1": - - patch_file: "patches/1.0.1-0001-fix-cmake.patch" - patch_description: "fix lack of linking libraries due to conan not generating the variables that are expected" - patch_type: "conan" diff --git a/recipes/opentelemetry-cpp/all/conanfile.py b/recipes/opentelemetry-cpp/all/conanfile.py index 7d1799e99839a..e13d0077e219b 100644 --- a/recipes/opentelemetry-cpp/all/conanfile.py +++ b/recipes/opentelemetry-cpp/all/conanfile.py @@ -1,16 +1,15 @@ -from conan import ConanFile +from conan import ConanFile, conan_version from conan.errors import ConanInvalidConfiguration -from conan.tools.files import apply_conandata_patches, export_conandata_patches, get, copy, rmdir, replace_in_file, save +from conan.tools.files import get, copy, rmdir, replace_in_file, save from conan.tools.build import check_min_cppstd from conan.tools.scm import Version from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout -from conan.tools.microsoft import check_min_vs -from conan.tools.env import Environment +from conan.tools.env import VirtualRunEnv, VirtualBuildEnv import os import textwrap -required_conan_version = ">=1.53.0" +required_conan_version = ">=1.56.0 <2 || >=2.0.6" class OpenTelemetryCppConan(ConanFile): name = "opentelemetry-cpp" @@ -28,7 +27,7 @@ class OpenTelemetryCppConan(ConanFile): "with_stl": [True, False], "with_gsl": [True, False], "with_abseil": [True, False], - "with_otlp": [True, False], + "with_otlp": ["deprecated", True, False], "with_otlp_grpc": [True, False], "with_otlp_http": [True, False], "with_zipkin": [True, False], @@ -50,7 +49,7 @@ class OpenTelemetryCppConan(ConanFile): "with_stl": False, "with_gsl": False, "with_abseil": True, - "with_otlp": True, + "with_otlp": "deprecated", "with_otlp_grpc": True, "with_otlp_http": True, "with_zipkin": True, @@ -67,23 +66,39 @@ class OpenTelemetryCppConan(ConanFile): short_paths = True @property - def _minimum_cpp_standard(self): + def _min_cppstd(self): + if self.options.with_abseil and Version(self.dependencies["abseil"].ref.version) >= "20230125": + return 14 return 11 - def export_sources(self): - export_conandata_patches(self) + @property + def _compilers_minimum_version(self): + if self._min_cppstd == 14: + return { + "gcc": "6", + "clang": "5", + "apple-clang": "10", + "Visual Studio": "16", + "msvc": "192", + } + else: + return { + "Visual Studio": "16", + "msvc": "192", + } def config_options(self): if self.settings.os == "Windows": self.options.rm_safe("fPIC") + if Version(self.version) >= "1.10": + del self.options.with_jaeger def configure(self): if self.options.shared: self.options.rm_safe("fPIC") - - if not self.options.with_otlp: - self.options.rm_safe("with_otlp_grpc") - self.options.rm_safe("with_otlp_http") + if self.options.with_otlp != "deprecated": + self.output.warning(f"{self.ref}:with_otlp option is deprecated, do not use anymore. " + "Please, consider with_otlp_grpc or with_otlp_http instead.") def layout(self): cmake_layout(self, src_folder="src") @@ -93,21 +108,15 @@ def requirements(self): self.requires("ms-gsl/4.0.0") if self.options.with_abseil: - self.requires("abseil/20220623.0", transitive_headers=True) + self.requires("abseil/20230125.3", transitive_headers=True) - if self.options.with_otlp: - self.requires("protobuf/3.21.9") - if Version(self.version) <= "1.4.1": - self.requires("opentelemetry-proto/0.11.0") - else: - self.requires("opentelemetry-proto/0.20.0") - - if self.options.get_safe("with_otlp_grpc"): - self.requires("grpc/1.50.1") + if self.options.with_otlp_grpc: + self.requires("protobuf/3.21.12", transitive_headers=True, transitive_libs=True) + self.requires("grpc/1.54.3", transitive_headers=True, transitive_libs=True) if (self.options.with_zipkin or self.options.with_elasticsearch or - self.options.get_safe("with_otlp_http") or + self.options.with_otlp_http or self.options.with_etw ): self.requires("nlohmann_json/3.11.2") @@ -115,38 +124,34 @@ def requirements(self): if (self.options.with_zipkin or self.options.with_elasticsearch or - self.options.get_safe("with_otlp_http") + self.options.with_otlp_http ): - self.requires("libcurl/8.1.1") + self.requires("libcurl/[>=7.78.0 <9]") if self.options.with_prometheus: self.requires("prometheus-cpp/1.1.0") - if self.options.with_jaeger: + if self.options.get_safe("with_jaeger"): self.requires("thrift/0.17.0") - - if Version(self.version) >= "1.3.0": - self.requires("boost/1.82.0") + self.requires("boost/1.82.0") @property def _required_boost_components(self): - return ["locale"] if self.options.with_jaeger and Version(self.version) >= "1.3.0" else [] + return ["locale"] if self.options.get_safe("with_jaeger") else [] def validate(self): - if self.settings.get_safe("compiler.cppstd"): - check_min_cppstd(self, self._minimum_cpp_standard) - check_min_vs(self, "192") + if self.settings.compiler.cppstd: + check_min_cppstd(self, self._min_cppstd) + minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) + if minimum_version and Version(self.settings.compiler.version) < minimum_version: + raise ConanInvalidConfiguration( + f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support." + ) if self.settings.os != "Linux" and self.options.shared: raise ConanInvalidConfiguration(f"{self.ref} supports building shared libraries only on Linux") - if self.options.get_safe("with_otlp_grpc") and not self.options.with_otlp: - raise ConanInvalidConfiguration("Option 'with_otlp_grpc' requires 'with_otlp'") - - if self.options.get_safe("with_otlp_http") and not self.options.with_otlp: - raise ConanInvalidConfiguration("Option 'with_otlp_http' requires 'with_otlp'") - - if self.options.get_safe("with_otlp_grpc"): + if self.options.with_otlp_grpc: if not self.dependencies["grpc"].options.cpp_plugin: raise ConanInvalidConfiguration(f"{self.ref} requires grpc with cpp_plugin=True") @@ -159,11 +164,16 @@ def validate(self): f"{', '.join(self._required_boost_components)}" ) + if conan_version.major == 1 and self.settings.compiler == "apple-clang" and Version(self.version) >= "1.12.0": + # Only fails on apple-clang in this configuration for some reason: + # https://github.com/conan-io/conan-center-index/pull/21332#issuecomment-1830766894 + raise ConanInvalidConfiguration("opentelemetry-cpp >= 1.12.0 does not support Apple Clang on Conan v1") + def build_requirements(self): - if self.options.with_otlp: - self.tool_requires("protobuf/3.21.9") - if self.options.get_safe("with_otlp_grpc"): - self.tool_requires("grpc/1.50.1") + if self.options.with_otlp_grpc: + self.tool_requires("opentelemetry-proto/1.0.0") + self.tool_requires("protobuf/") + self.tool_requires("grpc/") def _create_cmake_module_variables(self, module_file): content = textwrap.dedent("""\ @@ -176,72 +186,68 @@ def _create_cmake_module_variables(self, module_file): """) save(self, module_file, content) + def package_id(self): + # deprecated + del self.info.options.with_otlp + def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) def generate(self): - tc = CMakeToolchain(self) + VirtualBuildEnv(self).generate(scope="build") + VirtualRunEnv(self).generate(scope="build") - tc.variables["BUILD_TESTING"] = False - tc.variables["BUILD_BENCHMARK"] = False - - tc.variables["WITH_EXAMPLES"] = False - tc.variables["WITH_NO_DEPRECATED_CODE"] = self.options.with_no_deprecated_code - tc.variables["WITH_STL"] = self.options.with_stl - tc.variables["WITH_GSL"] = self.options.with_gsl - tc.variables["WITH_ABSEIL"] = self.options.with_abseil - tc.variables["WITH_OTLP"] = self.options.with_otlp - tc.variables["WITH_OTLP_GRPC"] = self.options.get_safe("with_otlp_grpc") - tc.variables["WITH_OTLP_HTTP"] = self.options.get_safe("with_otlp_http") - tc.variables["WITH_ZIPKIN"] = self.options.with_zipkin - tc.variables["WITH_PROMETHEUS"] = self.options.with_prometheus - tc.variables["WITH_ELASTICSEARCH"] = self.options.with_elasticsearch - tc.variables["WITH_ZPAGES"] = self.options.with_zpages - tc.variables["WITH_JAEGER"] = self.options.with_jaeger - tc.variables["WITH_NO_GETENV"] = self.options.with_no_getenv - tc.variables["WITH_ETW"] = self.options.with_etw - tc.variables["WITH_LOGS_PREVIEW"] = self.options.with_logs_preview - tc.variables["WITH_ASYNC_EXPORT_PREVIEW"] = self.options.with_async_export_preview - tc.variables["WITH_METRICS_EXEMPLAR_PREVIEW"] = self.options.with_metrics_exemplar_preview + tc = CMakeToolchain(self) + tc.cache_variables["BUILD_TESTING"] = False + tc.cache_variables["BUILD_BENCHMARK"] = False + tc.cache_variables["WITH_EXAMPLES"] = False + tc.cache_variables["WITH_NO_DEPRECATED_CODE"] = self.options.with_no_deprecated_code + tc.cache_variables["WITH_STL"] = self.options.with_stl + tc.cache_variables["WITH_GSL"] = self.options.with_gsl + tc.cache_variables["WITH_ABSEIL"] = self.options.with_abseil + if Version(self.version) < "1.10": + tc.cache_variables["WITH_OTLP"] = self.options.with_otlp_grpc or self.options.with_otlp_http + tc.cache_variables["WITH_OTLP_GRPC"] = self.options.with_otlp_grpc + tc.cache_variables["WITH_OTLP_HTTP"] = self.options.with_otlp_http + tc.cache_variables["WITH_ZIPKIN"] = self.options.with_zipkin + tc.cache_variables["WITH_PROMETHEUS"] = self.options.with_prometheus + tc.cache_variables["WITH_ELASTICSEARCH"] = self.options.with_elasticsearch + tc.cache_variables["WITH_ZPAGES"] = self.options.with_zpages + tc.cache_variables["WITH_JAEGER"] = self.options.get_safe("with_jaeger", False) + tc.cache_variables["WITH_NO_GETENV"] = self.options.with_no_getenv + tc.cache_variables["WITH_ETW"] = self.options.with_etw + tc.cache_variables["WITH_LOGS_PREVIEW"] = self.options.with_logs_preview + tc.cache_variables["WITH_ASYNC_EXPORT_PREVIEW"] = self.options.with_async_export_preview + tc.cache_variables["WITH_METRICS_EXEMPLAR_PREVIEW"] = self.options.with_metrics_exemplar_preview + tc.cache_variables["OPENTELEMETRY_INSTALL"] = True + if not self.settings.compiler.cppstd: + tc.variables["CMAKE_CXX_STANDARD"] = self._min_cppstd tc.generate() - tc = CMakeDeps(self) - tc.generate() + deps = CMakeDeps(self) - if self.settings.os == "Linux": - env = Environment() - if self.dependencies["grpc"].options.shared: - env.append_path("LD_LIBRARY_PATH", os.path.join(self.dependencies["grpc"].package_folder, "lib")) - if self.dependencies["protobuf"].options.shared: - env.append_path("LD_LIBRARY_PATH", os.path.join(self.dependencies["protobuf"].package_folder, "lib")) - env.vars(self).save_script("conanbuild_loadpath") + deps.generate() def _patch_sources(self): - protos_path = self.dependencies["opentelemetry-proto"].conf_info.get("user.opentelemetry-proto:proto_root").replace("\\", "/") - protos_cmake_path = os.path.join( - self.source_folder, - "cmake", - "opentelemetry-proto.cmake") - if Version(self.version) >= "1.1.0": - replace_in_file(self, - protos_cmake_path, - "if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/third_party/opentelemetry-proto/.git)", - "if(1)") - if Version(self.version) < "1.9.0": - replace_in_file(self, - protos_cmake_path, - "set(PROTO_PATH \"${CMAKE_CURRENT_SOURCE_DIR}/third_party/opentelemetry-proto\")", - f"set(PROTO_PATH \"{protos_path}\")") - else: - replace_in_file(self, - protos_cmake_path, - "\"${CMAKE_CURRENT_SOURCE_DIR}/third_party/opentelemetry-proto\")", - f"\"{protos_path}\")") + if self.options.with_otlp_http or self.options.with_otlp_grpc: + protos_path = self.dependencies.build["opentelemetry-proto"].conf_info.get("user.opentelemetry-proto:proto_root").replace("\\", "/") + protos_cmake_path = os.path.join(self.source_folder, "cmake", "opentelemetry-proto.cmake") + replace_in_file(self, protos_cmake_path, + "if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/third_party/opentelemetry-proto/.git)", + "if(1)") + if Version(self.version) < "1.8.3": + replace_in_file(self, protos_cmake_path, + 'set(PROTO_PATH "${CMAKE_CURRENT_SOURCE_DIR}/third_party/opentelemetry-proto")', + f'set(PROTO_PATH "{protos_path}")') + else: + replace_in_file(self, protos_cmake_path, + '"${CMAKE_CURRENT_SOURCE_DIR}/third_party/opentelemetry-proto")', + f'"{protos_path}")') + if self.options.with_otlp_grpc and Version(self.version) < "1.9.1": + save(self, protos_cmake_path, "\ntarget_link_libraries(opentelemetry_proto PUBLIC gRPC::grpc++)", append=True) rmdir(self, os.path.join(self.source_folder, "api", "include", "opentelemetry", "nostd", "absl")) - apply_conandata_patches(self) - def build(self): self._patch_sources() cmake = CMake(self) @@ -253,6 +259,7 @@ def package(self): cmake = CMake(self) cmake.install() rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) + rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) self._create_cmake_module_variables( os.path.join(self.package_folder, self._otel_cmake_variables_path) ) @@ -272,7 +279,7 @@ def _otel_build_modules(self): @property def _http_client_name(self): - return "http_client_curl" if Version(self.version) < "1.3.0" else "opentelemetry_http_client_curl" + return "opentelemetry_http_client_curl" @property def _otel_libraries(self): @@ -285,64 +292,41 @@ def _otel_libraries(self): "opentelemetry_trace", "opentelemetry_version", ] - - if self.options.with_otlp: + if self.options.with_otlp_grpc or self.options.with_otlp_http: libraries.extend([ "opentelemetry_proto", "opentelemetry_otlp_recordable", ]) - - if self.options.get_safe("with_otlp_grpc"): + if self.options.with_otlp_grpc: libraries.append("opentelemetry_exporter_otlp_grpc") - - if Version(self.version) >= "1.5.0": - libraries.append("opentelemetry_exporter_otlp_grpc_metrics") - + libraries.append("opentelemetry_exporter_otlp_grpc_metrics") if Version(self.version) >= "1.7.0": libraries.append("opentelemetry_exporter_otlp_grpc_client") - if self.options.with_logs_preview: libraries.append("opentelemetry_exporter_otlp_grpc_log") - - if self.options.get_safe("with_otlp_http"): + if self.options.with_otlp_http: libraries.append("opentelemetry_exporter_otlp_http") - - if Version(self.version) >= "1.1.0": - libraries.append("opentelemetry_exporter_otlp_http_client") - - if Version(self.version) >= "1.5.0": - libraries.append("opentelemetry_exporter_otlp_http_metric") - + libraries.append("opentelemetry_exporter_otlp_http_client") + libraries.append("opentelemetry_exporter_otlp_http_metric") if self.options.with_logs_preview: libraries.append("opentelemetry_exporter_otlp_http_log") - if self.options.with_prometheus: libraries.append("opentelemetry_exporter_prometheus") - if self.options.with_elasticsearch and self.options.with_logs_preview: libraries.append("opentelemetry_exporter_elasticsearch_logs") - if self.options.with_zipkin: libraries.append("opentelemetry_exporter_zipkin_trace") - - if self.options.with_jaeger: + if self.options.get_safe("with_jaeger"): libraries.append("opentelemetry_exporter_jaeger_trace") - - if Version(self.version) >= "1.2.0": - libraries.append("opentelemetry_metrics") - - if Version(self.version) >= "1.4.0": - libraries.append("opentelemetry_exporter_ostream_metrics") - + libraries.append("opentelemetry_metrics") + libraries.append("opentelemetry_exporter_ostream_metrics") if self.options.with_logs_preview: libraries.extend([ "opentelemetry_logs", "opentelemetry_exporter_ostream_logs", ]) - if self.settings.os == "Windows" and self.options.with_etw: libraries.append("opentelemetry_exporter_etw") - return libraries def package_info(self): @@ -391,20 +375,16 @@ def package_info(self): self.cpp_info.components["opentelemetry_common"].defines.append("HAVE_ABSEIL") self.cpp_info.components["opentelemetry_common"].requires.append("abseil::abseil") - if self.options.with_otlp: - self.cpp_info.components["opentelemetry_proto"].requires.extend([ - "opentelemetry-proto::opentelemetry-proto", - "protobuf::protobuf", - ]) - + if self.options.with_otlp_http or self.options.with_otlp_grpc: + self.cpp_info.components["opentelemetry_proto"].requires.append("protobuf::protobuf") self.cpp_info.components["opentelemetry_otlp_recordable"].requires.extend([ "opentelemetry_proto", "opentelemetry_resources", "opentelemetry_trace", ]) - if self.options.get_safe("with_otlp_grpc"): - if Version(self.version) >= "1.5.0" and Version(self.version) < "1.7.0": + if self.options.with_otlp_grpc: + if "1.5.0" <= Version(self.version) < "1.7.0": self.cpp_info.components["opentelemetry_exporter_otlp_grpc_metrics"].requires.extend([ "grpc::grpc++", "opentelemetry_otlp_recordable", @@ -438,14 +418,14 @@ def package_info(self): "opentelemetry_exporter_otlp_grpc_client", ]) - if (self.options.get_safe("with_otlp_http") or + if (self.options.with_otlp_http or self.options.with_zipkin or self.options.with_elasticsearch ): self.cpp_info.components[self._http_client_name].requires.append("libcurl::libcurl") self.cpp_info.components[self._http_client_name].requires.append("openssl::openssl") - if self.options.get_safe("with_otlp_http"): + if self.options.with_otlp_http: self.cpp_info.components["opentelemetry_exporter_otlp_http_client"].requires.extend([ self._http_client_name, "nlohmann_json::nlohmann_json", @@ -457,11 +437,10 @@ def package_info(self): "opentelemetry_exporter_otlp_http_client", ]) - if Version(self.version) >= "1.5.0": - self.cpp_info.components["opentelemetry_exporter_otlp_http_metric"].requires.extend([ - "opentelemetry_otlp_recordable", - "opentelemetry_exporter_otlp_http_client" - ]) + self.cpp_info.components["opentelemetry_exporter_otlp_http_metric"].requires.extend([ + "opentelemetry_otlp_recordable", + "opentelemetry_exporter_otlp_http_client" + ]) if self.options.with_logs_preview: self.cpp_info.components["opentelemetry_exporter_otlp_http_log"].requires.extend([ @@ -476,7 +455,7 @@ def package_info(self): "opentelemetry_trace", ]) - if self.options.with_jaeger: + if self.options.get_safe("with_jaeger"): self.cpp_info.components["opentelemetry_exporter_jaeger_trace"].requires.extend([ self._http_client_name, "openssl::openssl", @@ -484,10 +463,9 @@ def package_info(self): "thrift::thrift", ]) - if Version(self.version) >= "1.3.0": - self.cpp_info.components["opentelemetry_exporter_jaeger_trace"].requires.append( - "boost::locale" - ) + self.cpp_info.components["opentelemetry_exporter_jaeger_trace"].requires.append( + "boost::locale" + ) if self.settings.os == "Windows" and self.options.with_etw: self.cpp_info.components["opentelemetry_exporter_etw"].libs = [] diff --git a/recipes/opentelemetry-cpp/all/patches/1.0.1-0001-fix-cmake.patch b/recipes/opentelemetry-cpp/all/patches/1.0.1-0001-fix-cmake.patch deleted file mode 100644 index ecdbb0cf0f9fc..0000000000000 --- a/recipes/opentelemetry-cpp/all/patches/1.0.1-0001-fix-cmake.patch +++ /dev/null @@ -1,28 +0,0 @@ -diff --git a/cmake/opentelemetry-proto.cmake b/cmake/opentelemetry-proto.cmake -index 9fb6f49..1f1547e 100644 ---- a/cmake/opentelemetry-proto.cmake -+++ b/cmake/opentelemetry-proto.cmake -@@ -162,6 +162,10 @@ else() # cmake 3.8 or lower - target_link_libraries(opentelemetry_proto INTERFACE ${Protobuf_LIBRARIES}) - endif() - -+if(TARGET gRPC::grpc++) -+ target_link_libraries(opentelemetry_proto PUBLIC gRPC::grpc++) -+endif() -+ - if(BUILD_SHARED_LIBS) - set_property(TARGET opentelemetry_proto PROPERTY POSITION_INDEPENDENT_CODE ON) - endif() -diff --git a/exporters/zipkin/CMakeLists.txt b/exporters/zipkin/CMakeLists.txt -index 2316860..8995b31 100644 ---- a/exporters/zipkin/CMakeLists.txt -+++ b/exporters/zipkin/CMakeLists.txt -@@ -21,7 +21,7 @@ add_library(opentelemetry_exporter_zipkin_trace src/zipkin_exporter.cc - src/recordable.cc) - - target_link_libraries(opentelemetry_exporter_zipkin_trace -- PUBLIC opentelemetry_trace http_client_curl) -+ PUBLIC opentelemetry_trace http_client_curl nlohmann_json::nlohmann_json) - - install( - TARGETS opentelemetry_exporter_zipkin_trace diff --git a/recipes/opentelemetry-cpp/all/patches/1.2.0-0001-fix-cmake.patch b/recipes/opentelemetry-cpp/all/patches/1.2.0-0001-fix-cmake.patch deleted file mode 100644 index 275e2c9b44a66..0000000000000 --- a/recipes/opentelemetry-cpp/all/patches/1.2.0-0001-fix-cmake.patch +++ /dev/null @@ -1,15 +0,0 @@ -diff --git a/cmake/opentelemetry-proto.cmake b/cmake/opentelemetry-proto.cmake -index 8d8f868..2a78f98 100644 ---- a/cmake/opentelemetry-proto.cmake -+++ b/cmake/opentelemetry-proto.cmake -@@ -214,6 +214,10 @@ else() - ${METRICS_SERVICE_PB_CPP_FILE}) - endif() - -+if(TARGET gRPC::grpc++) -+ target_link_libraries(opentelemetry_proto PUBLIC gRPC::grpc++) -+endif() -+ - if(needs_proto_download) - add_dependencies(opentelemetry_proto opentelemetry-proto) - endif() diff --git a/recipes/opentelemetry-cpp/all/patches/1.3.0-0001-fix-cmake.patch b/recipes/opentelemetry-cpp/all/patches/1.3.0-0001-fix-cmake.patch deleted file mode 100644 index ce868fbedca22..0000000000000 --- a/recipes/opentelemetry-cpp/all/patches/1.3.0-0001-fix-cmake.patch +++ /dev/null @@ -1,27 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 09c21fd..a8d7d16 100755 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -203,7 +203,6 @@ if(WITH_JAEGER) - find_package(Thrift QUIET) - if(Thrift_FOUND) - find_package(Boost REQUIRED) -- include_directories(${Boost_INCLUDE_DIR}) - else() - # Install Thrift and propagate via vcpkg toolchain file - if(WIN32 AND (NOT DEFINED CMAKE_TOOLCHAIN_FILE)) -diff --git a/cmake/opentelemetry-proto.cmake b/cmake/opentelemetry-proto.cmake -index 8d8f868..2a78f98 100644 ---- a/cmake/opentelemetry-proto.cmake -+++ b/cmake/opentelemetry-proto.cmake -@@ -214,6 +214,10 @@ else() - ${METRICS_SERVICE_PB_CPP_FILE}) - endif() - -+if(TARGET gRPC::grpc++) -+ target_link_libraries(opentelemetry_proto PUBLIC gRPC::grpc++) -+endif() -+ - if(needs_proto_download) - add_dependencies(opentelemetry_proto opentelemetry-proto) - endif() diff --git a/recipes/opentelemetry-cpp/all/patches/1.4.0-0001-fix-cmake.patch b/recipes/opentelemetry-cpp/all/patches/1.4.0-0001-fix-cmake.patch deleted file mode 100644 index 1fcf5a0427738..0000000000000 --- a/recipes/opentelemetry-cpp/all/patches/1.4.0-0001-fix-cmake.patch +++ /dev/null @@ -1,27 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 6d2b274..4611a6b 100755 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -208,7 +208,6 @@ if(WITH_JAEGER) - find_package(Thrift QUIET) - if(Thrift_FOUND) - find_package(Boost REQUIRED) -- include_directories(${Boost_INCLUDE_DIR}) - else() - # Install Thrift and propagate via vcpkg toolchain file - if(WIN32 AND (NOT DEFINED CMAKE_TOOLCHAIN_FILE)) -diff --git a/cmake/opentelemetry-proto.cmake b/cmake/opentelemetry-proto.cmake -index 37d45da..89395c0 100644 ---- a/cmake/opentelemetry-proto.cmake -+++ b/cmake/opentelemetry-proto.cmake -@@ -215,6 +215,10 @@ else() - ${METRICS_SERVICE_PB_CPP_FILE}) - endif() - -+if(TARGET gRPC::grpc++) -+ target_link_libraries(opentelemetry_proto PUBLIC gRPC::grpc++) -+endif() -+ - if(needs_proto_download) - add_dependencies(opentelemetry_proto opentelemetry-proto) - endif() diff --git a/recipes/opentelemetry-cpp/all/patches/1.6.1-0001-fix-cmake.patch b/recipes/opentelemetry-cpp/all/patches/1.6.1-0001-fix-cmake.patch deleted file mode 100644 index b3391855652c4..0000000000000 --- a/recipes/opentelemetry-cpp/all/patches/1.6.1-0001-fix-cmake.patch +++ /dev/null @@ -1,27 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index a1b6934..d4f5251 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -209,7 +209,6 @@ if(WITH_JAEGER) - find_package(Thrift QUIET) - if(Thrift_FOUND) - find_package(Boost REQUIRED) -- include_directories(${Boost_INCLUDE_DIR}) - else() - # Install Thrift and propagate via vcpkg toolchain file - if(WIN32 AND (NOT DEFINED CMAKE_TOOLCHAIN_FILE)) -diff --git a/cmake/opentelemetry-proto.cmake b/cmake/opentelemetry-proto.cmake -index 629ea81..3b09b92 100644 ---- a/cmake/opentelemetry-proto.cmake -+++ b/cmake/opentelemetry-proto.cmake -@@ -242,6 +242,10 @@ else() # cmake 3.8 or lower - target_link_libraries(opentelemetry_proto INTERFACE ${Protobuf_LIBRARIES}) - endif() - -+if(TARGET gRPC::grpc++) -+ target_link_libraries(opentelemetry_proto PUBLIC gRPC::grpc++) -+endif() -+ - if(BUILD_SHARED_LIBS) - set_property(TARGET opentelemetry_proto PROPERTY POSITION_INDEPENDENT_CODE ON) - endif() diff --git a/recipes/opentelemetry-cpp/all/patches/1.7.0-0001-fix-cmake.patch b/recipes/opentelemetry-cpp/all/patches/1.7.0-0001-fix-cmake.patch deleted file mode 100644 index e5e3898386303..0000000000000 --- a/recipes/opentelemetry-cpp/all/patches/1.7.0-0001-fix-cmake.patch +++ /dev/null @@ -1,27 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index e7597fc8..d880a90d 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -217,7 +217,6 @@ if(WITH_JAEGER) - find_package(Thrift QUIET) - if(Thrift_FOUND) - find_package(Boost REQUIRED) -- include_directories(${Boost_INCLUDE_DIR}) - else() - # Install Thrift and propagate via vcpkg toolchain file - if(WIN32 AND (NOT DEFINED CMAKE_TOOLCHAIN_FILE)) -diff --git a/cmake/opentelemetry-proto.cmake b/cmake/opentelemetry-proto.cmake -index 629ea815..3b09b92e 100644 ---- a/cmake/opentelemetry-proto.cmake -+++ b/cmake/opentelemetry-proto.cmake -@@ -242,6 +242,10 @@ else() # cmake 3.8 or lower - target_link_libraries(opentelemetry_proto INTERFACE ${Protobuf_LIBRARIES}) - endif() - -+if(TARGET gRPC::grpc++) -+ target_link_libraries(opentelemetry_proto PUBLIC gRPC::grpc++) -+endif() -+ - if(BUILD_SHARED_LIBS) - set_property(TARGET opentelemetry_proto PROPERTY POSITION_INDEPENDENT_CODE ON) - endif() diff --git a/recipes/opentelemetry-cpp/all/patches/1.8.1-0001-fix-cmake.patch b/recipes/opentelemetry-cpp/all/patches/1.8.1-0001-fix-cmake.patch deleted file mode 100644 index 5c4fcae46b11b..0000000000000 --- a/recipes/opentelemetry-cpp/all/patches/1.8.1-0001-fix-cmake.patch +++ /dev/null @@ -1,27 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 9b9710d..6eb42bb 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -222,7 +222,6 @@ if(WITH_JAEGER) - find_package(Thrift QUIET) - if(Thrift_FOUND) - find_package(Boost REQUIRED) -- include_directories(${Boost_INCLUDE_DIR}) - else() - # Install Thrift and propagate via vcpkg toolchain file - if(WIN32 AND (NOT DEFINED CMAKE_TOOLCHAIN_FILE)) -diff --git a/cmake/opentelemetry-proto.cmake b/cmake/opentelemetry-proto.cmake -index 47f57a6..ebf5869 100644 ---- a/cmake/opentelemetry-proto.cmake -+++ b/cmake/opentelemetry-proto.cmake -@@ -280,6 +280,10 @@ else() # cmake 3.8 or lower - target_link_libraries(opentelemetry_proto INTERFACE ${Protobuf_LIBRARIES}) - endif() - -+if(TARGET gRPC::grpc++) -+ target_link_libraries(opentelemetry_proto PUBLIC gRPC::grpc++) -+endif() -+ - if(BUILD_SHARED_LIBS) - set_property(TARGET opentelemetry_proto PROPERTY POSITION_INDEPENDENT_CODE ON) - endif() diff --git a/recipes/opentelemetry-cpp/all/patches/1.9.1-0001-fix-cmake.patch b/recipes/opentelemetry-cpp/all/patches/1.9.1-0001-fix-cmake.patch deleted file mode 100644 index 6deba6e434af5..0000000000000 --- a/recipes/opentelemetry-cpp/all/patches/1.9.1-0001-fix-cmake.patch +++ /dev/null @@ -1,27 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index dbfb6a2..83c92cc 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -299,7 +299,6 @@ if(WITH_JAEGER) - find_package(Thrift QUIET) - if(Thrift_FOUND) - find_package(Boost REQUIRED) -- include_directories(${Boost_INCLUDE_DIR}) - else() - # Install Thrift and propagate via vcpkg toolchain file - if(WIN32 AND (NOT DEFINED CMAKE_TOOLCHAIN_FILE)) -diff --git a/cmake/opentelemetry-proto.cmake b/cmake/opentelemetry-proto.cmake -index 34b33d3..19e67e9 100644 ---- a/cmake/opentelemetry-proto.cmake -+++ b/cmake/opentelemetry-proto.cmake -@@ -311,6 +311,10 @@ if(WITH_OTLP_GRPC) - endif() - endif() - -+if(TARGET gRPC::grpc++) -+ target_link_libraries(opentelemetry_proto PUBLIC gRPC::grpc++) -+endif() -+ - if(BUILD_SHARED_LIBS) - foreach(proto_target ${OPENTELEMETRY_PROTO_TARGETS}) - set_property(TARGET ${proto_target} PROPERTY POSITION_INDEPENDENT_CODE ON) diff --git a/recipes/opentelemetry-cpp/config.yml b/recipes/opentelemetry-cpp/config.yml index 8429e67e0bca0..ea5fa8db677c4 100644 --- a/recipes/opentelemetry-cpp/config.yml +++ b/recipes/opentelemetry-cpp/config.yml @@ -1,19 +1,9 @@ versions: + "1.12.0": + folder: all "1.9.1": folder: all - "1.8.1": + "1.8.3": folder: all "1.7.0": folder: all - "1.6.1": - folder: all - "1.4.1": - folder: all - "1.4.0": - folder: all - "1.3.0": - folder: all - "1.2.0": - folder: all - "1.0.1": - folder: all