Skip to content

Commit

Permalink
Clean up of build system
Browse files Browse the repository at this point in the history
- missing build_depend on message_generation
- added repository url
- use find_package on libsegwayrmp, not pkg-config
- general CMakeLists.txt cleanup
- add missing install target for node
- removed old rosinstall file and mainpage.dox
  • Loading branch information
wjwwood committed May 7, 2013
1 parent effe945 commit 056942c
Show file tree
Hide file tree
Showing 4 changed files with 54 additions and 86 deletions.
78 changes: 43 additions & 35 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,54 +1,62 @@
cmake_minimum_required(VERSION 2.8.3)
project(segway_rmp)
# Load catkin and all dependencies required for this package
find_package(catkin REQUIRED COMPONENTS roscpp tf message_generation geometry_msgs nav_msgs serial)

# libsegwyarmp provides segwayrmp and ftd2xx
find_package(PkgConfig REQUIRED)
pkg_check_modules(LIBSEGWAYRMP REQUIRED libsegwayrmp)
find_library(LIBSEGWAYRMP_LIBRARY
NAMES segwayrmp
PATHS ${LIBSEGWAYRMP_LIBRARY_DIRS}
)
find_library(LIBFTD2XX_LIBRARY
NAMES ftd2xx
PATHS ${LIBSEGWAYRMP_LIBRARY_DIRS}

find_package(catkin REQUIRED
COMPONENTS
geometry_msgs
message_generation
message_runtime
nav_msgs
roscpp
serial
std_msgs
tf
)

#set the default path for built executables to the "bin" directory
set(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin)
#set the default path for built libraries to the "lib" directory
set(LIBRARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/lib)
find_package(Boost REQUIRED COMPONENTS system thread)

find_package(libsegwayrmp REQUIRED)

#uncomment if you have defined messages
add_message_files(
DIRECTORY msg
FILES SegwayStatus.msg SegwayStatusStamped.msg
)

## Generate added messages and services with any dependencies listed here
generate_messages(
DEPENDENCIES std_msgs
generate_messages(DEPENDENCIES std_msgs)

include_directories(
${Boost_INCLUDE_DIRS}
${libsegwayrmp_INCLUDE_DIRS}
${catkin_INCLUDE_DIRS}
)

include_directories(${Boost_INCLUDE_DIRS} ${LIBSEGWAYRMP_INCLUDE_DIRS})
catkin_package(
DEPENDS libsegwayrmp
CATKIN_DEPENDS
geometry_msgs
nav_msgs
roscpp
serial
std_msgs
tf
)

add_executable(segway_rmp_node src/segway_rmp_node.cpp)
find_package(Boost REQUIRED COMPONENTS system thread)

target_link_libraries(
segway_rmp_node
${Boost_LIBRARIES}
${LIBSEGWAYRMP_LIBRARY}
${LIBFTD2XX_LIBRARY}
message("libsegwayrmp_LIBRARIES: ${libsegwayrmp_LIBRARIES}")

target_link_libraries(segway_rmp_node
${Boost_LIBRARIES}
${libsegwayrmp_LIBRARIES}
${catkin_LIBRARIES}
)

## DEPENDS: system dependencies of this project that dependent projects also need
## CATKIN_DEPENDS: catkin_packages dependent projects also need
## INCLUDE_DIRS:
## LIBRARIES: libraries you create in this project that dependent projects also need
catkin_package(
DEPENDS libsegwayrmp
CATKIN_DEPENDS roscpp tf geometry_msgs nav_msgs std_msgs serial
install(TARGETS segway_rmp_node
ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
)

install(DIRECTORY launch
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/launch
)
26 changes: 0 additions & 26 deletions mainpage.dox

This file was deleted.

24 changes: 11 additions & 13 deletions package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
<license>BSD</license>

<url type="website">http://ros.org/wiki/segway_rmp</url>
<url type="repository">https://github.com/segwayrmp/segway-rmp-ros-pkg</url>
<url type="bugtracker">https://github.com/segwayrmp/segway-rmp-ros-pkg/issues</url>

<maintainer email="[email protected]">William Woodall</maintainer>
Expand All @@ -14,25 +15,22 @@

<buildtool_depend>catkin</buildtool_depend>

<build_depend>message_generation</build_depend>
<build_depend>roscpp</build_depend>
<build_depend>tf</build_depend>
<build_depend>geometry_msgs</build_depend>
<build_depend>nav_msgs</build_depend>
<build_depend>std_msgs</build_depend>
<build_depend>libsegwayrmp</build_depend>
<build_depend>message_generation</build_depend>
<build_depend>nav_msgs</build_depend>
<build_depend>roscpp</build_depend>
<build_depend>serial</build_depend>
<build_depend>std_msgs</build_depend>
<build_depend>tf</build_depend>

<run_depend>message_runtime</run_depend>
<run_depend>roscpp</run_depend>
<run_depend>tf</run_depend>
<run_depend>geometry_msgs</run_depend>
<run_depend>nav_msgs</run_depend>
<run_depend>std_msgs</run_depend>
<run_depend>libsegwayrmp</run_depend>
<run_depend>message_runtime</run_depend>
<run_depend>nav_msgs</run_depend>
<run_depend>roscpp</run_depend>
<run_depend>serial</run_depend>
<run_depend>std_msgs</run_depend>
<run_depend>tf</run_depend>

<export>

</export>
</package>
12 changes: 0 additions & 12 deletions segway_rmp.rosinstall

This file was deleted.

0 comments on commit 056942c

Please sign in to comment.