From 2c4b2a910c56ec60bcce0ba86a3296d59d121061 Mon Sep 17 00:00:00 2001 From: andremarianiello Date: Wed, 11 Oct 2023 13:18:32 -0400 Subject: [PATCH] Fix behavior of opentracing-shim when added as subdirectory of a larger project (#2356) --- opentracing-shim/CMakeLists.txt | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/opentracing-shim/CMakeLists.txt b/opentracing-shim/CMakeLists.txt index 5f83de5474..b77b9c1985 100644 --- a/opentracing-shim/CMakeLists.txt +++ b/opentracing-shim/CMakeLists.txt @@ -14,10 +14,13 @@ target_include_directories( "$") if(OPENTRACING_DIR) - include_directories( - "${CMAKE_BINARY_DIR}/${OPENTRACING_DIR}/include" - "${CMAKE_SOURCE_DIR}/${OPENTRACING_DIR}/include" - "${CMAKE_SOURCE_DIR}/${OPENTRACING_DIR}/3rd_party/include") + target_include_directories( + ${this_target} + PUBLIC + "$" + "$" + "$" + ) target_link_libraries(${this_target} opentelemetry_api opentracing) else() target_link_libraries(${this_target} opentelemetry_api