Skip to content

Commit

Permalink
Cleaned up CMakeLists, reformated and fixed white space
Browse files Browse the repository at this point in the history
  • Loading branch information
shaun-edwards committed Jan 6, 2014
1 parent dad2fe5 commit a132631
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 145 deletions.
57 changes: 3 additions & 54 deletions industrial_robot_client/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
# http://ros.org/doc/groovy/api/catkin/html/user_guide/supposed.html
cmake_minimum_required(VERSION 2.8.3)

project(industrial_robot_client)
# Load catkin and all dependencies required for this package

find_package(catkin REQUIRED COMPONENTS roscpp std_msgs sensor_msgs control_msgs trajectory_msgs simple_message actionlib_msgs actionlib urdf industrial_msgs industrial_utils)

## System dependencies are found with CMake's conventions
# find_package(Boost REQUIRED COMPONENTS system)
find_package(Boost REQUIRED COMPONENTS system thread)

# The definition is copied from the CMakeList for the simple_message package.
add_definitions(-DROS=1) #build using ROS libraries
add_definitions(-DROS=1) #build using ROS libraries
add_definitions(-DLINUXSOCKETS=1) #build using LINUX SOCKETS libraries

set(SRC_FILES src/joint_relay_handler.cpp
Expand All @@ -20,57 +18,13 @@ set(SRC_FILES src/joint_relay_handler.cpp
src/robot_state_interface.cpp
src/utils.cpp)

#######################################
## Declare ROS messages and services ##
#######################################

## Generate messages in the 'msg' folder
# add_message_files(
# FILES
# Message1.msg
# Message2.msg
# )

## Generate services in the 'srv' folder
# add_service_files(
# FILES
# Service1.srv
# Service2.srv
# )

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

###################################
## catkin specific configuration ##
###################################
## The catkin_package macro generates cmake config files for your package
## Declare things to be passed to dependent projects
## LIBRARIES: libraries you create in this project that dependent projects also need
## CATKIN_DEPENDS: catkin_packages dependent projects also need
## DEPENDS: system dependencies of this project that dependent projects also need

# NOTE: The libraries generated this package are not included in the catkin_package
# macro because libraries must be explicitly linked in projects that depend on this
# package. If this is not done (and these libraries were exported), then multiple
# library definitions (normal - industrial_robot_client and byteswapped -
# industrial_robot_client_bswap) are both included (this is bad).

catkin_package(
CATKIN_DEPENDS roscpp std_msgs sensor_msgs control_msgs trajectory_msgs simple_message actionlib_msgs actionlib urdf industrial_msgs industrial_utils
INCLUDE_DIRS include
)


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

## Specify additional locations of header files
## Your package locations should be listed before other locations
include_directories(include
${catkin_INCLUDE_DIRS}
)
Expand All @@ -88,14 +42,12 @@ include_directories(include
# or
# target_link_libraries(my_node industrial_robot_client_bswap)


add_library(industrial_robot_client ${SRC_FILES})
target_link_libraries(industrial_robot_client simple_message)

add_library(industrial_robot_client_bswap ${SRC_FILES})
target_link_libraries(industrial_robot_client_bswap simple_message_bswap)


# The following executables(nodes) are for applications where the robot
# controller and pc have the same byte order (i.e. byte swapping NOT
# required)
Expand Down Expand Up @@ -164,9 +116,6 @@ target_link_libraries(utest_robot_client
${catkin_LIBRARIES})


#############
## Install ##
#############
install(
TARGETS industrial_robot_client industrial_robot_client_bswap
LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION})
Expand Down
21 changes: 2 additions & 19 deletions industrial_robot_simulator/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,30 +1,13 @@
# http://ros.org/doc/groovy/api/catkin/html/user_guide/supposed.html
cmake_minimum_required(VERSION 2.8.3)

project(industrial_robot_simulator)
# Load catkin and all dependencies required for this package
find_package(catkin REQUIRED COMPONENTS roscpp std_msgs sensor_msgs control_msgs trajectory_msgs industrial_robot_client)

# Python setup
#catkin_python_setup()
find_package(catkin REQUIRED COMPONENTS roscpp std_msgs sensor_msgs control_msgs trajectory_msgs industrial_robot_client)

###################################
## catkin specific configuration ##
###################################
## The catkin_package macro generates cmake config files for your package
## Declare things to be passed to dependent projects
## LIBRARIES: libraries you create in this project that dependent projects also need
## CATKIN_DEPENDS: catkin_packages dependent projects also need
## DEPENDS: system dependencies of this project that dependent projects also need
catkin_package(
CATKIN_DEPENDS roscpp std_msgs sensor_msgs control_msgs trajectory_msgs industrial_robot_client
)

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

# all install targets should use catkin DESTINATION variables
# See http://ros.org/doc/groovy/api/catkin/html/adv_user_guide/variables.html

install(PROGRAMS industrial_robot_simulator DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION})

Expand Down
8 changes: 1 addition & 7 deletions industrial_trajectory_filters/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# http://ros.org/doc/groovy/api/catkin/html/user_guide/supposed.html
cmake_minimum_required(VERSION 2.8.3)

project(industrial_trajectory_filters)

find_package(catkin REQUIRED COMPONENTS moveit_ros_planning trajectory_msgs)
Expand All @@ -14,17 +14,11 @@ include_directories(include
${catkin_INCLUDE_DIRS}
)

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

add_library(${PROJECT_NAME} src/n_point_filter.cpp src/uniform_sample_filter.cpp)
target_link_libraries(${PROJECT_NAME} ${catkin_LIBRARIES})


#############
## Install ##
#############
install(TARGETS ${PROJECT_NAME}
LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION})

Expand Down
51 changes: 6 additions & 45 deletions industrial_utils/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,69 +1,30 @@
# http://ros.org/doc/groovy/api/catkin/html/user_guide/supposed.html
cmake_minimum_required(VERSION 2.8.3)

project(industrial_utils)
# Load catkin and all dependencies required for this package

find_package(catkin REQUIRED COMPONENTS roscpp urdf)

## System dependencies are found with CMake's conventions
# find_package(Boost REQUIRED COMPONENTS system)
find_package(Boost REQUIRED COMPONENTS system)

#######################################
## Declare ROS messages and services ##
#######################################

## Generate messages in the 'msg' folder
# add_message_files(
# FILES
# Message1.msg
# Message2.msg
# )

## Generate services in the 'srv' folder
# add_service_files(
# FILES
# Service1.srv
# Service2.srv
# )

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

###################################
## catkin specific configuration ##
###################################
## The catkin_package macro generates cmake config files for your package
## Declare things to be passed to dependent projects
## LIBRARIES: libraries you create in this project that dependent projects also need
## CATKIN_DEPENDS: catkin_packages dependent projects also need
## DEPENDS: system dependencies of this project that dependent projects also need
catkin_package(
CATKIN_DEPENDS roscpp urdf
INCLUDE_DIRS include
LIBRARIES ${PROJECT_NAME}
)

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

## Specify additional locations of header files
## Your package locations should be listed before other locations
include_directories(include
${catkin_INCLUDE_DIRS})

add_library(${PROJECT_NAME} src/utils.cpp src/param_utils.cpp)
target_link_libraries(${PROJECT_NAME} ${catkin_LIBRARIES})



catkin_add_gtest(utest_inds_utils test/utest.cpp)
target_link_libraries(utest_inds_utils ${PROJECT_NAME} ${catkin_LIBRARIES})

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


install(
TARGETS ${PROJECT_NAME}
LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION})
Expand Down
24 changes: 4 additions & 20 deletions simple_message/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# http://ros.org/doc/groovy/api/catkin/html/user_guide/supposed.html
cmake_minimum_required(VERSION 2.8.3)

project(simple_message)
# Load catkin and all dependencies required for this package

find_package(catkin REQUIRED COMPONENTS roscpp industrial_msgs)

# Build static libs, to reduce dependency-chaining for industrial_robot_client
Expand All @@ -12,7 +12,7 @@ set(ROS_BUILD_SHARED_LIBS false)
# and various robot controllers. This requires conditionally compiling
# certain functions and headers. The definition below enables compiling
# for a ROS node.
add_definitions(-DROS=1) #build using ROS libraries
add_definitions(-DROS=1) #build using ROS libraries
add_definitions(-DLINUXSOCKETS=1) #use linux sockets for communication

set(SRC_FILES src/byte_array.cpp
Expand Down Expand Up @@ -61,15 +61,6 @@ set(UTEST_SRC_FILES test/utest.cpp test/utest_message.cpp)
# controllers). This library performs byte swapping at the lowest load/unload
# levels.

###################################
## catkin specific configuration ##
###################################
## The catkin_package macro generates cmake config files for your package
## Declare things to be passed to dependent projects
## LIBRARIES: libraries you create in this project that dependent projects also need
## CATKIN_DEPENDS: catkin_packages dependent projects also need
## DEPENDS: system dependencies of this project that dependent projects also need

# NOTE: The libraries generated this package are not included in the catkin_package
# macro because libraries must be explicitly linked in projects that depend on this
# package. If this is not done (and these libraries were exported), then multiple
Expand All @@ -81,12 +72,7 @@ catkin_package(
INCLUDE_DIRS include
)

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

## Specify additional locations of header files
## Your package locations should be listed before other locations
include_directories(include
${catkin_INCLUDE_DIRS}
)
Expand Down Expand Up @@ -124,9 +110,7 @@ set_target_properties(utest_float64 PROPERTIES COMPILE_DEFINITIONS "TEST_PORT_BA
target_link_libraries(utest_float64 simple_message_float64)


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

install(
TARGETS simple_message simple_message_bswap simple_message_float64
LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION})
Expand Down

0 comments on commit a132631

Please sign in to comment.