mirror of
https://github.com/wjwwood/serial.git
synced 2026-01-22 19:54:57 +08:00
Migrated to ROS2
Followed migration instructions in https://index.ros.org/doc/ros2/Contributing/Migration-Guide/
This commit is contained in:
parent
683e12d2f6
commit
7430d521e0
@ -1,29 +1,20 @@
|
||||
cmake_minimum_required(VERSION 2.8.3)
|
||||
cmake_minimum_required(VERSION 3.5)
|
||||
project(serial)
|
||||
|
||||
# Find catkin
|
||||
find_package(catkin REQUIRED)
|
||||
find_package(ament_cmake REQUIRED)
|
||||
|
||||
if(APPLE)
|
||||
find_library(IOKIT_LIBRARY IOKit)
|
||||
find_library(FOUNDATION_LIBRARY Foundation)
|
||||
endif()
|
||||
|
||||
ament_export_include_directories(include)
|
||||
ament_export_libraries(${PROJECT_NAME})
|
||||
if(UNIX AND NOT APPLE)
|
||||
# If Linux, add rt and pthread
|
||||
set(rt_LIBRARIES rt)
|
||||
set(pthread_LIBRARIES pthread)
|
||||
catkin_package(
|
||||
LIBRARIES ${PROJECT_NAME}
|
||||
INCLUDE_DIRS include
|
||||
DEPENDS rt pthread
|
||||
)
|
||||
else()
|
||||
# Otherwise normal call
|
||||
catkin_package(
|
||||
LIBRARIES ${PROJECT_NAME}
|
||||
INCLUDE_DIRS include
|
||||
)
|
||||
ament_export_dependencies(rt pthread)
|
||||
endif()
|
||||
|
||||
## Sources
|
||||
@ -66,15 +57,18 @@ include_directories(include)
|
||||
|
||||
## Install executable
|
||||
install(TARGETS ${PROJECT_NAME}
|
||||
ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
|
||||
LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
|
||||
ARCHIVE DESTINATION lib
|
||||
LIBRARY DESTINATION lib
|
||||
)
|
||||
|
||||
## Install headers
|
||||
install(FILES include/serial/serial.h include/serial/v8stdint.h
|
||||
DESTINATION ${CATKIN_GLOBAL_INCLUDE_DESTINATION}/serial)
|
||||
DESTINATION include/serial
|
||||
)
|
||||
|
||||
## Tests
|
||||
if(CATKIN_ENABLE_TESTING)
|
||||
if(BUILD_TESTING)
|
||||
add_subdirectory(tests)
|
||||
endif()
|
||||
|
||||
ament_package()
|
||||
|
||||
@ -19,8 +19,12 @@
|
||||
<author email="wjwwood@gmail.com">William Woodall</author>
|
||||
<author email="ash.gti@gmail.com">John Harrison</author>
|
||||
|
||||
<buildtool_depend>catkin</buildtool_depend>
|
||||
<buildtool_depend>ament_cmake</buildtool_depend>
|
||||
|
||||
<test_depend>boost</test_depend>
|
||||
|
||||
<export>
|
||||
<build_type>ament_cmake</build_type>
|
||||
</export>
|
||||
|
||||
</package>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user