vcpkg/ports/opentelemetry-cpp/fix-target_link.patch

27 lines
973 B
Diff

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 5fd2c6f..d8a1b2c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -714,7 +714,7 @@ include_directories(api/include)
add_subdirectory(api)
if(WITH_OPENTRACING)
- find_package(OpenTracing CONFIG QUIET)
+ find_package(OpenTracing CONFIG REQUIRED)
if(NOT OpenTracing_FOUND)
set(OPENTRACING_DIR "third_party/opentracing-cpp")
message(STATUS "Trying to use local ${OPENTRACING_DIR} from submodule")
diff --git a/opentracing-shim/CMakeLists.txt b/opentracing-shim/CMakeLists.txt
index b77b9c1..dff6439 100644
--- a/opentracing-shim/CMakeLists.txt
+++ b/opentracing-shim/CMakeLists.txt
@@ -24,7 +24,7 @@ if(OPENTRACING_DIR)
target_link_libraries(${this_target} opentelemetry_api opentracing)
else()
target_link_libraries(${this_target} opentelemetry_api
- OpenTracing::opentracing)
+ OpenTracing::opentracing-static)
endif()
if(OPENTELEMETRY_INSTALL)