diff --git a/examples/common/foo_library/CMakeLists.txt b/examples/common/foo_library/CMakeLists.txt index 8f62a4d7da..2942d78c87 100644 --- a/examples/common/foo_library/CMakeLists.txt +++ b/examples/common/foo_library/CMakeLists.txt @@ -6,6 +6,7 @@ set_target_version(common_foo_library) if(DEFINED OPENTELEMETRY_BUILD_DLL) message(STATUS "OPENTELEMETRY_BUILD_DLL for common_foo_library") + target_compile_definitions(common_foo_library PRIVATE OPENTELEMETRY_BUILD_IMPORT_DLL=1) target_link_libraries(common_foo_library opentelemetry_cpp) else() target_link_libraries(common_foo_library PUBLIC ${CMAKE_THREAD_LIBS_INIT}