aboutsummaryrefslogtreecommitdiff
path: root/vcpkg/ports/opentelemetry-cpp/fix-target_link.patch
blob: f4709e8b1c28f400817272c8e556a50c6f70a8b6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
diff --git a/cmake/opentracing-cpp.cmake b/cmake/opentracing-cpp.cmake
index f014ecd..fd8898a 100644
--- a/cmake/opentracing-cpp.cmake
+++ b/cmake/opentracing-cpp.cmake
@@ -1,7 +1,11 @@
 # Copyright The OpenTelemetry Authors
 # SPDX-License-Identifier: Apache-2.0
 
-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()
+
 set(OpenTracing_PROVIDER "find_package")
 
 if(NOT OpenTracing_FOUND)