Skip to content

Commit

Permalink
opentelemetry-cpp: make sure we use our opentelemetry-proto
Browse files Browse the repository at this point in the history
  • Loading branch information
Cogitri committed Aug 15, 2023
1 parent c865e93 commit b485bfe
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion recipes/opentelemetry-cpp/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,7 @@ def generate(self):
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.variables["OTELCPP_PROTO_PATH"] = self._proto_root

if Version(self.version) < "1.10":
tc.variables["WITH_OTLP"] = self.options.with_otlp
Expand All @@ -226,8 +227,12 @@ def generate(self):
env.append_path("LD_LIBRARY_PATH", os.path.join(self.dependencies["protobuf"].package_folder, "lib"))
env.vars(self).save_script("conanbuild_loadpath")

@property
def _proto_root(self):
return self.dependencies["opentelemetry-proto"].conf_info.get("user.opentelemetry-proto:proto_root").replace("\\", "/")

def _patch_sources(self):
protos_path = self.dependencies["opentelemetry-proto"].conf_info.get("user.opentelemetry-proto:proto_root").replace("\\", "/")
protos_path = self._proto_root
protos_cmake_path = os.path.join(
self.source_folder,
"cmake",
Expand Down

0 comments on commit b485bfe

Please sign in to comment.