Use ament_cmake_ros (#444)

* Control shared/static linking via BUILD_SHARED_LIBS

* Remove rmw dependency

* Add for rclcpp_lifecycle too

* exec depend on ament_cmake is for normalize_path
This commit is contained in:
dhood 2018-02-26 09:46:44 -08:00 committed by GitHub
parent 0e79842b6b
commit 3786c91deb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 5 additions and 6 deletions

View file

@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.5)
project(rclcpp)
find_package(ament_cmake REQUIRED)
find_package(ament_cmake_ros REQUIRED)
find_package(builtin_interfaces REQUIRED)
find_package(rcl REQUIRED)
find_package(rcl_interfaces REQUIRED)
@ -93,7 +93,7 @@ list(APPEND ${PROJECT_NAME}_SRCS
include/rclcpp/logging.hpp)
include_directories("${CMAKE_CURRENT_BINARY_DIR}/include")
add_library(${PROJECT_NAME} SHARED
add_library(${PROJECT_NAME}
${${PROJECT_NAME}_SRCS})
ament_target_dependencies(${PROJECT_NAME}
"builtin_interfaces"

View file

@ -7,7 +7,7 @@
<maintainer email="dthomas@osrfoundation.org">Dirk Thomas</maintainer>
<license>Apache License 2.0</license>
<buildtool_depend>ament_cmake</buildtool_depend>
<buildtool_depend>ament_cmake_ros</buildtool_depend>
<build_export_depend>rmw</build_export_depend>

View file

@ -10,7 +10,7 @@ if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
add_compile_options(-Wall -Wextra -Wpedantic)
endif()
find_package(ament_cmake REQUIRED)
find_package(ament_cmake_ros REQUIRED)
find_package(rclcpp REQUIRED)
find_package(rcl_lifecycle REQUIRED)
find_package(std_msgs REQUIRED)
@ -20,7 +20,6 @@ include_directories(include)
### CPP High level library
add_library(rclcpp_lifecycle
SHARED
src/lifecycle_node.cpp
src/node_interfaces/lifecycle_node_interface.cpp
src/state.cpp

View file

@ -7,7 +7,7 @@
<maintainer email="karsten@osrfoundation.org">Karsten Knese</maintainer>
<license>Apache License 2.0</license>
<buildtool_depend>ament_cmake</buildtool_depend>
<buildtool_depend>ament_cmake_ros</buildtool_depend>
<buildtool_depend>rosidl_default_generators</buildtool_depend>
<build_depend>rclcpp</build_depend>