Skip to content

Commit

Permalink
fixing USE_ROS flag to include system ROS message headers by default
Browse files Browse the repository at this point in the history
git-svn-id: svn+ssh://svn.pointclouds.org/pcl/trunk@8760 a9d63959-f2ad-4865-b262-bf0e56cfafb6
  • Loading branch information
jkammerl committed Mar 5, 2013
1 parent 0c64f9b commit 9003e42
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ if(NOT PCL_SHARED_LIBS OR WIN32)
set(FLANN_USE_STATIC ON)
endif(NOT PCL_SHARED_LIBS OR WIN32)
find_package(FLANN 1.7.0 REQUIRED)
include_directories(SYSTEM ${FLANN_INCLUDE_DIRS})
include_directories(${FLANN_INCLUDE_DIRS})

# libusb-1.0
find_package(libusb-1.0)
Expand Down
14 changes: 7 additions & 7 deletions cmake/pcl_find_ros.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -22,20 +22,19 @@ macro(get_ros_inc_path _dest _pkg)
endif()
endmacro(get_ros_inc_path)

#todo: do we really need the next two lines?
set(ROS_ROOT $ENV{ROS_ROOT})
set(ROS_DISTRO $ENV{ROS_DISTRO})

if(ROS_ROOT)
if(ROS_DISTRO)
option(USE_ROS "Integrate with ROS rather than using native files" OFF)
message(STATUS "Found ROS; USE_ROS is ${USE_ROS}")
message(STATUS "Found ROS; USE_ROS is ${USE_ROS}; ROS-Distro: ${ROS_DISTRO}")
if(USE_ROS)
# Search for ROS
if (ROS_DISTRO EQUAL "groovy")
if (ROS_DISTRO STREQUAL "groovy")
find_package(catkin REQUIRED COMPONENTS roscpp_serialization std_msgs sensor_msgs rostime)
if (catkin_FOUND)
# if find_package(ROS ...) found the required components, add their include directories
include_directories(${catkin_INCLUDE_DIRS})
include_directories(BEFORE ${catkin_INCLUDE_DIRS})
MESSAGE( STATUS "catkin_INCLUDE_DIRS: " ${catkin_INCLUDE_DIRS} )
else()
# otherwise, search for these particular packages the old hacky way
set(_ros_pkgs std_msgs sensor_msgs roscpp_serialization cpp_common rostime
Expand Down Expand Up @@ -89,5 +88,6 @@ if(ROS_ROOT)
SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)

endif(USE_ROS)
endif(ROS_ROOT)

endif(ROS_DISTRO)

0 comments on commit 9003e42

Please sign in to comment.