forked from wg-perception/object_recognition_ros
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
91 lines (73 loc) · 2.69 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
cmake_minimum_required(VERSION 2.8)
project(object_recognition_ros)
find_package(catkin REQUIRED)
if (${catkin_VERSION} VERSION_GREATER "0.5.28")
find_package(catkin REQUIRED ecto ecto_ros geometric_shapes geometry_msgs object_recognition_core
object_recognition_msgs pluginlib rosbag roscpp rviz sensor_msgs tf
visualization_msgs
)
catkin_package()
else()
find_package(ROS REQUIRED ecto ecto_ros geometry_msgs object_recognition_core
object_recognition_msgs rosbag roscpp sensor_msgs
visualization_msgs
)
catkin_stack()
catkin_project(object_recognition_ros)
set(catkin_LIBRARIES ${ROS_LIBRARIES})
set(catkin_INCLUDE_DIRS ${ROS_INCLUDE_DIRS})
set(CATKIN_DEVEL_PREFIX ${CMAKE_BINARY_DIR})
set(CATKIN_PACKAGE_BIN_DESTINATION share/${PROJECT_NAME}/bin)
set(CATKIN_PACKAGE_INCLUDE_DESTINATION include/${PROJECT_NAME})
set(CATKIN_PACKAGE_LIB_DESTINATION lib)
set(CATKIN_PACKAGE_PYTHON_BUILD_DESTINATION gen/py/${PROJECT_NAME}/)
set(CATKIN_PACKAGE_PYTHON_DESTINATION ${INSTALLED_PYTHONPATH}/${PROJECT_NAME}/)
set(CATKIN_PACKAGE_SHARE_DESTINATION share/${PROJECT_NAME}/)
add_definitions(-DROS_FUERTE_FOUND=1)
endif()
#install targets for all things python
catkin_python_setup()
# build some cells
include_directories(SYSTEM ${catkin_INCLUDE_DIRS})
include_directories(include)
add_subdirectory(python)
add_definitions("-Wno-pragmas -fno-strict-aliasing -Wall -Wl,--no-undefined -Werror")
#set the default path for built libraries to the lib directory
if (NOT CMAKE_LIBRARY_OUTPUT_DIRECTORY)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
endif()
find_package(Boost REQUIRED system filesystem serialization)
find_package(OpenCV REQUIRED)
add_subdirectory(src)
# add tests
option(BUILD_TEST "Build tests" ON)
if(BUILD_TEST)
enable_testing()
add_subdirectory(test)
endif()
# add docs
catkin_doxygen(object_recognition_ros-doxygen ${CMAKE_CURRENT_SOURCE_DIR}/include)
ecto_sphinx(${CMAKE_CURRENT_SOURCE_DIR}/doc/source doc)
# install
if (ROS_FUERTE_FOUND)
set(CATKIN_PACKAGE_SHARE_DESTINATION share/${PROJECT_NAME}/)
else()
install(FILES ork_rviz_plugin.xml
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
)
endif()
# install the executables
install(PROGRAMS apps/server apps/client
DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
)
install(DIRECTORY launch
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
)
# install the configuration files
install(DIRECTORY ${PROJECT_SOURCE_DIR}/conf
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
)
# install the include dirs
install(DIRECTORY ${PROJECT_SOURCE_DIR}/include/${PROJECT_NAME}/
DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}
)