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

17 lines
638 B
Diff

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 4e65f049..fead44d4 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -862,7 +862,10 @@ endif()
add_subdirectory(api)
if(WITH_OPENTRACING)
- find_package(OpenTracing CONFIG QUIET)
+ find_package(OpenTracing CONFIG REQUIRED)
+ if(NOT TARGET OpenTracing::opentracing AND TARGET OpenTracing::opentracing-static)
+ add_library(OpenTracing::opentracing ALIAS OpenTracing::opentracing-static)
+ endif()
if(NOT OpenTracing_FOUND)
set(OPENTRACING_DIR "third_party/opentracing-cpp")
message(STATUS "Trying to use local ${OPENTRACING_DIR} from submodule")