1
0
mirror of https://github.com/wjwwood/serial.git synced 2026-01-22 19:54:57 +08:00

Export library with headers

This commit is contained in:
JADC362 2021-04-27 14:28:48 -05:00
parent 8f6e58d17c
commit 76cea5ab5b

View File

@ -72,16 +72,23 @@ target_include_directories(${PROJECT_NAME}
$<INSTALL_INTERFACE:include>) $<INSTALL_INTERFACE:include>)
#include_directories(include) #include_directories(include)
## Install executable ## Install library
install(TARGETS ${PROJECT_NAME} install(
TARGETS ${PROJECT_NAME}
EXPORT ${PROJECT_NAME}
ARCHIVE DESTINATION lib ARCHIVE DESTINATION lib
LIBRARY DESTINATION lib LIBRARY DESTINATION lib
RUNTIME DESTINATION bin RUNTIME DESTINATION bin
INCLUDES DESTINATION include
) )
## Install headers ## Install headers
install(FILES include/serial/serial.h include/serial/v8stdint.h #install(FILES include/serial/serial.h include/serial/v8stdint.h
DESTINATION share/${PROJECT_NAME}) # DESTINATION share/${PROJECT_NAME})
install(
DIRECTORY include/
DESTINATION include
)
# Install executable # Install executable
install(TARGETS serial_example install(TARGETS serial_example
@ -97,4 +104,6 @@ if(BUILD_TESTING)
ament_lint_auto_find_test_dependencies() ament_lint_auto_find_test_dependencies()
endif() endif()
ament_export_targets(${PROJECT_NAME})
#ament_export_libraries(${PROJECT_NAME})
ament_package() ament_package()