Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update CMakeLists.txt and package.xml #404

Merged
merged 20 commits into from
Jan 14, 2020
Merged
Show file tree
Hide file tree
Changes from 17 commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 30 additions & 13 deletions combined_robot_hw/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,33 +1,50 @@
cmake_minimum_required(VERSION 2.8.3)
project(combined_robot_hw)

# Load catkin and all dependencies required for this package
find_package(catkin REQUIRED COMPONENTS
hardware_interface
pluginlib
roscpp
)

include_directories(include ${catkin_INCLUDE_DIRS})

# Declare a catkin package
catkin_package(
INCLUDE_DIRS include
LIBRARIES ${PROJECT_NAME}
CATKIN_DEPENDS hardware_interface pluginlib roscpp
INCLUDE_DIRS
include
LIBRARIES
${PROJECT_NAME}
CATKIN_DEPENDS
hardware_interface
pluginlib
roscpp
)

add_library(${PROJECT_NAME}
src/combined_robot_hw.cpp
)

###########
## Build ##
###########

# Specify header include paths
include_directories(include ${catkin_INCLUDE_DIRS})
bmagyar marked this conversation as resolved.
Show resolved Hide resolved

add_library(${PROJECT_NAME} src/combined_robot_hw.cpp)
add_dependencies(${PROJECT_NAME} ${catkin_EXPORTED_TARGETS})
target_link_libraries(${PROJECT_NAME} ${catkin_LIBRARIES} ${Boost_LIBRARIES})
target_link_libraries(${PROJECT_NAME} ${catkin_LIBRARIES})


#############
## Install ##
#############

# Install
# Install headers
install(DIRECTORY include/${PROJECT_NAME}/
DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION})
DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}
)

# Install library
# Install targets
install(TARGETS ${PROJECT_NAME}
ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
RUNTIME DESTINATION ${CATKIN_GLOBAL_BIN_DESTINATION})
RUNTIME DESTINATION ${CATKIN_GLOBAL_BIN_DESTINATION}
)
3 changes: 2 additions & 1 deletion combined_robot_hw/package.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version="1.0"?>
<package format="2">
<name>combined_robot_hw</name>
<version>0.15.1</version>
<description>Combined Robot HW class.</description>

<maintainer email="bence.magyar.robotics@gmail.com">Bence Magyar</maintainer>
<maintainer email="toni@shadowrobot.com">Toni Oliver</maintainer>
<maintainer email="enrique.fernandez.perdomo@gmail.com">Enrique Fernandez</maintainer>
Expand All @@ -17,6 +17,7 @@
<author email="toni@shadowrobot.com">Toni Oliver</author>

<buildtool_depend>catkin</buildtool_depend>

<depend>hardware_interface</depend>
<depend>pluginlib</depend>
<depend>roscpp</depend>
Expand Down
73 changes: 44 additions & 29 deletions combined_robot_hw_tests/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,37 +1,42 @@
cmake_minimum_required(VERSION 2.8.3)
project(combined_robot_hw_tests)

# Load catkin and all dependencies required for this package
find_package(catkin REQUIRED COMPONENTS
combined_robot_hw
controller_manager
controller_manager_msgs
controller_manager_tests
hardware_interface
pluginlib
roscpp
)

include_directories(include ${catkin_INCLUDE_DIRS})
# Declare a catkin package
catkin_package()

catkin_package(
INCLUDE_DIRS include
LIBRARIES ${PROJECT_NAME}
CATKIN_DEPENDS combined_robot_hw hardware_interface roscpp
)

add_library(${PROJECT_NAME}
src/my_robot_hw_1.cpp
src/my_robot_hw_2.cpp
src/my_robot_hw_3.cpp
src/my_robot_hw_4.cpp
)
add_dependencies(${PROJECT_NAME} ${catkin_EXPORTED_TARGETS})
target_link_libraries(${PROJECT_NAME} ${catkin_LIBRARIES} ${Boost_LIBRARIES})

add_executable(combined_robot_hw_dummy_app src/dummy_app.cpp)
target_link_libraries(combined_robot_hw_dummy_app ${PROJECT_NAME} ${catkin_LIBRARIES})
#############
## Testing ##
#############

if(CATKIN_ENABLE_TESTING)

find_package(rostest REQUIRED)

# Specify header include paths
include_directories(include ${catkin_INCLUDE_DIRS})

add_library(${PROJECT_NAME}
src/my_robot_hw_1.cpp
src/my_robot_hw_2.cpp
src/my_robot_hw_3.cpp
src/my_robot_hw_4.cpp
)
target_link_libraries(${PROJECT_NAME} ${catkin_LIBRARIES})

add_executable(combined_robot_hw_dummy_app EXCLUDE_FROM_ALL src/dummy_app.cpp)
target_link_libraries(combined_robot_hw_dummy_app ${PROJECT_NAME} ${catkin_LIBRARIES})

add_rostest_gtest(combined_robot_hw_test
bmagyar marked this conversation as resolved.
Show resolved Hide resolved
test/combined_robot_hw_test.test
test/combined_robot_hw_test.cpp
Expand All @@ -42,19 +47,29 @@ if(CATKIN_ENABLE_TESTING)
test/cm_test.test
test/cm_test.cpp
)
add_dependencies(combined_robot_hw_cm_test combined_robot_hw_dummy_app ${catkin_EXPORTED_TARGETS})
target_link_libraries(combined_robot_hw_cm_test ${PROJECT_NAME} ${catkin_LIBRARIES})

endif()

# Install
install(DIRECTORY include/${PROJECT_NAME}/
DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION})

# Install library
install(TARGETS ${PROJECT_NAME}
ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
RUNTIME DESTINATION ${CATKIN_GLOBAL_BIN_DESTINATION})
#############
## Install ##
#############

# NOTE: Libraries and plugins required for tests are installed since CI
# runs tests out of the install space rather than the devel space

if(CATKIN_ENABLE_TESTING)

# Install targets
install(TARGETS ${PROJECT_NAME}
ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
RUNTIME DESTINATION ${CATKIN_GLOBAL_BIN_DESTINATION}
)

install(FILES test_robot_hw_plugin.xml
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION})
# Install plugins
install(FILES test_robot_hw_plugin.xml
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
)
endif()
16 changes: 10 additions & 6 deletions combined_robot_hw_tests/package.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version="1.0"?>
<package format="2">
<name>combined_robot_hw_tests</name>
<version>0.15.1</version>
<description>The combined_robot_hw_tests package</description>
<description>Tests for the combined Robot HW class.</description>

<maintainer email="bence.magyar.robotics@gmail.com">Bence Magyar</maintainer>
<maintainer email="toni@shadowrobot.com">Toni Oliver</maintainer>
<maintainer email="enrique.fernandez.perdomo@gmail.com">Enrique Fernandez</maintainer>
Expand All @@ -17,12 +17,16 @@
<author email="toni@shadowrobot.com">Toni Oliver</author>

<buildtool_depend>catkin</buildtool_depend>
<depend>combined_robot_hw</depend>
<depend>controller_manager</depend>
<depend>controller_manager_tests</depend>

<depend>hardware_interface</depend>
<depend>roscpp</depend>
<depend>pluginlib</depend>

<build_depend>combined_robot_hw</build_depend>
<build_depend>controller_manager</build_depend>
<build_depend>roscpp</build_depend>

<test_depend>controller_manager_msgs</test_depend>
<test_depend>controller_manager_tests</test_depend>
<test_depend>rostest</test_depend>

<export>
Expand Down
48 changes: 30 additions & 18 deletions controller_interface/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,32 +2,44 @@ cmake_minimum_required(VERSION 2.8.3)
project(controller_interface)

# Load catkin and all dependencies required for this package
find_package(catkin REQUIRED COMPONENTS roscpp hardware_interface pluginlib)
find_package(catkin REQUIRED COMPONENTS
hardware_interface
roscpp
)

# Declare catkin package
# Declare a catkin package
catkin_package(
CATKIN_DEPENDS roscpp hardware_interface pluginlib
INCLUDE_DIRS include
)
INCLUDE_DIRS
include
CATKIN_DEPENDS
hardware_interface
roscpp
)

if(CATKIN_ENABLE_TESTING)

find_package(rosunit REQUIRED)
###########
## Build ##
###########

catkin_add_gmock(controller_base_test
test/controller_base_test.cpp
)
# Specify header include paths
include_directories(include ${catkin_INCLUDE_DIRS})

target_include_directories(controller_base_test PRIVATE include)
target_include_directories(controller_base_test SYSTEM PRIVATE ${catkin_INCLUDE_DIRS})

target_link_libraries(controller_base_test
${catkin_LIBRARIES}
)
#############
## Testing ##
#############

if(CATKIN_ENABLE_TESTING)
catkin_add_gmock(controller_base_test test/controller_base_test.cpp)
target_link_libraries(controller_base_test ${catkin_LIBRARIES})
endif()

# Install
install(DIRECTORY include/${PROJECT_NAME}/
DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION})

#############
## Install ##
#############

# Install headers
install(DIRECTORY include/${PROJECT_NAME}/
DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}
)
6 changes: 2 additions & 4 deletions controller_interface/package.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
<package format="2">
<name>controller_interface</name>
<version>0.15.1</version>
<description>Interface base class for controllers</description>
<description>Interface base class for controllers.</description>

<maintainer email="bence.magyar.robotics@gmail.com">Bence Magyar</maintainer>
<maintainer email="enrique.fernandez.perdomo@gmail.com">Enrique Fernandez</maintainer>
<maintainer email="mathias.luedtke@ipa.fraunhofer.de">Mathias Lüdtke</maintainer>
Expand All @@ -17,8 +18,5 @@
<buildtool_depend>catkin</buildtool_depend>

<depend>hardware_interface</depend>
<depend>pluginlib</depend>
<depend>roscpp</depend>

<test_depend>rosunit</test_depend>
</package>
Loading