greenhouse/pcl_conversions/CMakeLists.txt

45 lines
1.4 KiB
CMake
Raw Normal View History

cmake_minimum_required(VERSION 2.8)
2013-06-26 15:41:31 -07:00
project(pcl_conversions)
2018-04-30 12:03:07 -04:00
find_package(catkin REQUIRED COMPONENTS)
2013-06-26 15:41:31 -07:00
2018-04-30 11:10:34 -04:00
find_package(PCL REQUIRED COMPONENTS common io)
2018-04-30 10:58:35 -04:00
find_package(Eigen3 REQUIRED)
2013-06-26 15:41:31 -07:00
# There is a bug in the Ubuntu Artful (17.10) version of the VTK package,
# where it includes /usr/include/*-linux-gnu/freetype2 in the include
# directories (which doesn't exist). This filters down to the PCL_INCLUDE_DIRS,
# and causes downstream projects trying to use these libraries to fail to
# configure properly. Here we remove those bogus entries so that downstream
# consumers of this package succeed.
if(NOT "${PCL_INCLUDE_DIRS}" STREQUAL "")
foreach(item ${PCL_INCLUDE_DIRS})
string(REGEX MATCH "/usr/include/.*-linux-gnu/freetype2" item ${item})
if(item)
list(REMOVE_ITEM PCL_INCLUDE_DIRS ${item})
endif()
endforeach()
endif()
2013-06-26 15:41:31 -07:00
catkin_package(
2018-04-30 11:10:34 -04:00
INCLUDE_DIRS include
CATKIN_DEPENDS pcl_msgs roscpp sensor_msgs std_msgs
2018-04-30 12:03:07 -04:00
DEPENDS EIGEN3 PCL
2013-06-26 15:41:31 -07:00
)
install(DIRECTORY include/${PROJECT_NAME}/
DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}
)
if(CATKIN_ENABLE_TESTING)
2018-04-30 12:37:44 -04:00
find_package(catkin REQUIRED COMPONENTS roscpp pcl_msgs sensor_msgs std_msgs)
2018-04-30 11:10:34 -04:00
include_directories(
include
${catkin_INCLUDE_DIRS}
${PCL_INCLUDE_DIRS}
2018-04-30 12:03:07 -04:00
${EIGEN3_INCLUDE_DIRS})
2018-04-30 11:10:34 -04:00
catkin_add_gtest(test_pcl_conversions test/test_pcl_conversions.cpp)
target_link_libraries(test_pcl_conversions ${catkin_LIBRARIES})
endif()