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

Adapt CMakeLists.txt to compile the code with ament and install in ROS 2.0 directories

This commit is contained in:
ahcorde 2016-06-01 13:48:23 +02:00
parent 8396d842f7
commit e9aa2c29fa
2 changed files with 15 additions and 21 deletions

View File

@ -15,22 +15,19 @@ list(APPEND serial_SRCS src/impl/list_ports/list_ports_linux.cc)
## Add serial library ## Add serial library
add_library(${PROJECT_NAME} SHARED ${serial_SRCS}) add_library(${PROJECT_NAME} SHARED ${serial_SRCS})
target_link_libraries(${PROJECT_NAME} rt pthread) 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 headers
include_directories(include) include_directories(include)
## Install executable install(
install(TARGETS ${PROJECT_NAME} TARGETS ${PROJECT_NAME}
ARCHIVE DESTINATION /usr/lib ARCHIVE DESTINATION lib
LIBRARY DESTINATION /usr/lib LIBRARY DESTINATION lib
RUNTIME DESTINATION bin
) )
## Install headers install(
install(FILES include/serial/serial.h include/serial/v8stdint.h DIRECTORY include/
DESTINATION /usr/include/serial) DESTINATION include
)

View File

@ -1,11 +1,10 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<package> <package format="2">
<name>serial</name> <name>serial</name>
<version>1.2.1</version> <version>1.2.1</version>
<description> <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. 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> </description>
<maintainer email="william@osrfoundation.org">William Woodall</maintainer> <maintainer email="william@osrfoundation.org">William Woodall</maintainer>
<license>MIT</license> <license>MIT</license>
@ -14,11 +13,9 @@
<url type="repository">https://github.com/wjwwood/serial</url> <url type="repository">https://github.com/wjwwood/serial</url>
<url type="bugtracker">https://github.com/wjwwood/serial/issues</url> <url type="bugtracker">https://github.com/wjwwood/serial/issues</url>
<author email="wjwwood@gmail.com">William Woodall</author> <buildtool_depend>ament_cmake</buildtool_depend>
<author email="ash.gti@gmail.com">John Harrison</author>
<buildtool_depend>catkin</buildtool_depend>
<test_depend>boost</test_depend>
<export>
<build_type>ament_cmake</build_type>
</export>
</package> </package>