mirror of
https://github.com/wjwwood/serial.git
synced 2026-01-22 19:54:57 +08:00
Adapt CMakeLists.txt to compile the code with ament and install in ROS 2.0 directories
This commit is contained in:
parent
8396d842f7
commit
e9aa2c29fa
@ -17,20 +17,17 @@ list(APPEND serial_SRCS src/impl/list_ports/list_ports_linux.cc)
|
||||
add_library(${PROJECT_NAME} SHARED ${serial_SRCS})
|
||||
target_link_libraries(${PROJECT_NAME} rt pthread)
|
||||
|
||||
add_executable(serial_example examples/serial_example.cc)
|
||||
add_dependencies(serial_example ${PROJECT_NAME})
|
||||
target_link_libraries(serial_example ${PROJECT_NAME})
|
||||
|
||||
## Include headers
|
||||
include_directories(include)
|
||||
|
||||
## Install executable
|
||||
install(TARGETS ${PROJECT_NAME}
|
||||
ARCHIVE DESTINATION /usr/lib
|
||||
LIBRARY DESTINATION /usr/lib
|
||||
install(
|
||||
TARGETS ${PROJECT_NAME}
|
||||
ARCHIVE DESTINATION lib
|
||||
LIBRARY DESTINATION lib
|
||||
RUNTIME DESTINATION bin
|
||||
)
|
||||
|
||||
## Install headers
|
||||
install(FILES include/serial/serial.h include/serial/v8stdint.h
|
||||
DESTINATION /usr/include/serial)
|
||||
|
||||
install(
|
||||
DIRECTORY include/
|
||||
DESTINATION include
|
||||
)
|
||||
|
||||
13
package.xml
13
package.xml
@ -1,11 +1,10 @@
|
||||
<?xml version="1.0"?>
|
||||
<package>
|
||||
<package format="2">
|
||||
<name>serial</name>
|
||||
<version>1.2.1</version>
|
||||
<description>
|
||||
Serial is a cross-platform, simple to use library for using serial ports on computers. This library provides a C++, object oriented interface for interacting with RS-232 like devices on Linux and Windows.
|
||||
</description>
|
||||
|
||||
<maintainer email="william@osrfoundation.org">William Woodall</maintainer>
|
||||
|
||||
<license>MIT</license>
|
||||
@ -14,11 +13,9 @@
|
||||
<url type="repository">https://github.com/wjwwood/serial</url>
|
||||
<url type="bugtracker">https://github.com/wjwwood/serial/issues</url>
|
||||
|
||||
<author email="wjwwood@gmail.com">William Woodall</author>
|
||||
<author email="ash.gti@gmail.com">John Harrison</author>
|
||||
|
||||
<buildtool_depend>catkin</buildtool_depend>
|
||||
|
||||
<test_depend>boost</test_depend>
|
||||
<buildtool_depend>ament_cmake</buildtool_depend>
|
||||
|
||||
<export>
|
||||
<build_type>ament_cmake</build_type>
|
||||
</export>
|
||||
</package>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user