Skip to content

Commit df89c38

Browse files
committed
Fixes shared_library checking in conan
1 parent e586b1a commit df89c38

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

cmake/opentelemetry-proto.cmake

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,10 @@ if(TARGET protobuf::libprotobuf)
239239
"(^|[\\\\\\/])[^\\\\\\/]*protobuf[^\\\\\\/]*\\.(a|lib)$")
240240
set(protobuf_lib_type "STATIC_LIBRARY")
241241
break()
242+
elseif(protobuf_lib_file MATCHES
243+
"(^|[\\\\\\/])[^\\\\\\/]*protobuf[^\\\\\\/]*\\.(so|dll|dylib)$")
244+
set(protobuf_lib_type "SHARED_LIBRARY")
245+
break()
242246
endif()
243247
endforeach()
244248
endif()
@@ -396,6 +400,10 @@ if(WITH_OTLP_GRPC)
396400
"(^|[\\\\\\/])[^\\\\\\/]*grpc[^\\\\\\/]*\\.(a|lib)$")
397401
set(grpc_lib_type "STATIC_LIBRARY")
398402
break()
403+
elseif(grpc_lib_file MATCHES
404+
"(^|[\\\\\\/])[^\\\\\\/]*grpc[^\\\\\\/]*\\.(so|dll|dylib)$")
405+
set(grpc_lib_type "SHARED_LIBRARY")
406+
break()
399407
endif()
400408
endforeach()
401409
endif()

exporters/otlp/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -398,7 +398,7 @@ if(BUILD_TESTING)
398398
add_executable(otlp_grpc_exporter_test test/otlp_grpc_exporter_test.cc)
399399
target_link_libraries(
400400
otlp_grpc_exporter_test ${GTEST_BOTH_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT}
401-
${GMOCK_LIB} opentelemetry_exporter_otlp_grpc gRPC::grpc++)
401+
${GMOCK_LIB} opentelemetry_exporter_otlp_grpc)
402402
gtest_add_tests(
403403
TARGET otlp_grpc_exporter_test
404404
TEST_PREFIX exporter.otlp.

0 commit comments

Comments
 (0)