enable visibility control for building on Win32

we still have no functionality on Windows, but at least it compiles
This commit is contained in:
Luetkebohle Ingo (CR/AEX3) 2019-08-01 11:51:27 +02:00
parent 4e622b7978
commit dac5ffa719
3 changed files with 65 additions and 3 deletions

View file

@ -48,13 +48,18 @@ if(TRACING_ENABLED)
target_compile_definitions(${PROJECT_NAME} PUBLIC TRACETOOLS_LTTNG_ENABLED)
target_link_libraries(${PROJECT_NAME} ${LTTNG_LIBRARIES} -ldl)
endif()
if(WIN32)
# Causes the visibility macros to use dllexport rather than dllimport
# which is appropriate when building the dll but not consuming it.
target_compile_definitions(${PROJECT_NAME}
PRIVATE "TRACETOOLS_BUILDING_DLL")
endif()
ament_export_interfaces(${PROJECT_NAME}_export HAS_LIBRARY_TARGET)
# Status checking tool
add_executable(status
src/status.c
src/tracetools.c
src/utils.cpp
)
target_link_libraries(status