Do not export tracetools if empty

Signed-off-by: Christophe Bedard <bedard.christophe@gmail.com>
This commit is contained in:
Christophe Bedard 2020-09-03 15:38:05 -04:00
parent 347e578510
commit 514f57e690

View file

@ -95,7 +95,9 @@ target_include_directories(${PROJECT_NAME} PUBLIC
"$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/include>" "$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/include>"
"$<INSTALL_INTERFACE:include>" "$<INSTALL_INTERFACE:include>"
) )
if(NOT TRACETOOLS_DISABLED)
ament_export_targets(${PROJECT_NAME}_export HAS_LIBRARY_TARGET) ament_export_targets(${PROJECT_NAME}_export HAS_LIBRARY_TARGET)
endif()
if(TRACETOOLS_STATUS_CHECKING_TOOL) if(TRACETOOLS_STATUS_CHECKING_TOOL)
# Status checking tool # Status checking tool
@ -131,7 +133,7 @@ if(TRACETOOLS_LTTNG_ENABLED)
if(NOT TRACETOOLS_NO_RDYNAMIC) if(NOT TRACETOOLS_NO_RDYNAMIC)
ament_export_link_flags("-rdynamic") ament_export_link_flags("-rdynamic")
endif() endif()
else() elseif(NOT TRACETOOLS_DISABLED)
ament_export_libraries(${PROJECT_NAME}) ament_export_libraries(${PROJECT_NAME})
endif() endif()