Skip to content

Commit

Permalink
Fix common_foo_library when building with OPENTELEMETRY_BUILD_DLL
Browse files Browse the repository at this point in the history
  • Loading branch information
meastp authored Dec 27, 2023
1 parent ddfafff commit 1434f3b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion examples/common/foo_library/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,9 @@ endif()
add_library(common_foo_library foo_library.h foo_library.cc)
set_target_version(common_foo_library)

target_link_libraries(common_foo_library PUBLIC ${CMAKE_THREAD_LIBS_INIT}
if(DEFINED OPENTELEMETRY_BUILD_DLL)
target_link_libraries(common_foo_library opentelemetry_cpp)
else()
target_link_libraries(common_foo_library PUBLIC ${CMAKE_THREAD_LIBS_INIT}
opentelemetry_api)
endif()

0 comments on commit 1434f3b

Please sign in to comment.