1
0
mirror of https://github.com/wjwwood/serial.git synced 2026-01-22 11:44:53 +08:00

Minor change on CMakeList Test

This commit is contained in:
JADC362 2021-04-26 08:42:56 -05:00
parent 64fad1f7c9
commit 8f6e58d17c

View File

@ -62,12 +62,15 @@ endif()
## Uncomment for example
add_executable(serial_example examples/serial_example.cc)
#ament_target_dependencies(serial_example ${PROJECT_NAME})
target_link_libraries(serial_example ${PROJECT_NAME})
## Include headers
include_directories(include)
target_include_directories(${PROJECT_NAME}
PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:include>)
#include_directories(include)
## Install executable
install(TARGETS ${PROJECT_NAME}
@ -86,13 +89,12 @@ install(TARGETS serial_example
)
## Tests
#if(BUILD_TESTING)
# add_subdirectory(tests)
#endif()
if(BUILD_TESTING)
find_package(ament_lint_auto REQUIRED)
target_include_directories(${PROJECT_NAME}
PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:include>)
#add_subdirectory(tests)
ament_lint_auto_find_test_dependencies()
endif()
ament_package()