Skip to content

Commit

Permalink
try the fallback
Browse files Browse the repository at this point in the history
  • Loading branch information
h-vetinari committed May 26, 2023
1 parent 7e0e4aa commit f837972
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions recipe/patches/0004-ensure-we-correctly-link-to-protobuf.patch
Original file line number Diff line number Diff line change
@@ -1,23 +1,24 @@
From bd1260daa9344b35cf719db3ca412198a57171cf Mon Sep 17 00:00:00 2001
From 94174b0cc5e4f7f5cec3797a76e61266e7a05e62 Mon Sep 17 00:00:00 2001
From: "H. Vetinari" <h.vetinari@gmx.com>
Date: Sat, 27 May 2023 10:34:28 +1100
Subject: [PATCH 4/4] ensure we correctly link to protobuf

---
cmake/opentelemetry-proto.cmake | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
cmake/opentelemetry-proto.cmake | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/cmake/opentelemetry-proto.cmake b/cmake/opentelemetry-proto.cmake
index e869cb11..50a8101a 100644
index e869cb11..a867a2c9 100644
--- a/cmake/opentelemetry-proto.cmake
+++ b/cmake/opentelemetry-proto.cmake
@@ -291,7 +291,8 @@ if(OPENTELEMETRY_INSTALL)
@@ -291,9 +291,7 @@ if(OPENTELEMETRY_INSTALL)
PATTERN "*.h")
endif()

-if(TARGET protobuf::libprotobuf)
+find_package(Protobuf REQUIRED)
- target_link_libraries(opentelemetry_proto PUBLIC protobuf::libprotobuf)
-else() # cmake 3.8 or lower
+if(TRUE)
target_link_libraries(opentelemetry_proto PUBLIC protobuf::libprotobuf)
else() # cmake 3.8 or lower
target_include_directories(opentelemetry_proto
PUBLIC ${Protobuf_INCLUDE_DIRS})
target_link_libraries(opentelemetry_proto PUBLIC ${Protobuf_LIBRARIES})

0 comments on commit f837972

Please sign in to comment.