forked from ros-drivers/openni_camera
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
73 lines (59 loc) · 2.58 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
cmake_minimum_required(VERSION 2.8.3)
project(openni_camera)
find_package(catkin COMPONENTS camera_info_manager dynamic_reconfigure image_transport nodelet roscpp sensor_msgs REQUIRED)
find_package(Boost COMPONENTS system filesystem thread REQUIRED)
find_package(PkgConfig)
pkg_check_modules(PC_LIBOPENNI REQUIRED libopenni)
pkg_check_modules(PC_LIBUSB REQUIRED libusb-1.0)
generate_dynamic_reconfigure_options(cfg/OpenNI.cfg)
catkin_package(
INCLUDE_DIRS include
LIBRARIES openni_nodelet openni_driver
CATKIN_DEPENDS camera_info_manager dynamic_reconfigure image_transport nodelet roscpp
DEPENDS Boost PC_LIBOPENNI
)
include_directories(include
${PC_LIBOPENNI_INCLUDE_DIRS}
${catkin_INCLUDE_DIRS}
${Boost_INCLUDE_DIRS}
)
add_definitions(${PC_LIBOPENNI_CFLAGS_OTHER})
# OpenNI Driver standalone library
add_library(openni_driver src/openni_driver.cpp
src/openni_device.cpp
src/openni_exception.cpp
src/openni_device_primesense.cpp
src/openni_device_kinect.cpp
src/openni_device_xtion.cpp
src/openni_device_oni.cpp
src/openni_image_yuv_422.cpp
src/openni_image_bayer_grbg.cpp
src/openni_image_rgb24.cpp
src/openni_ir_image.cpp
src/openni_depth_image.cpp
)
target_link_libraries(openni_driver ${catkin_LIBRARIES}
${Boost_LIBRARIES}
${PC_LIBOPENNI_LIBRARIES}
${PC_LIBUSB_LIBRARIES}
)
# ROS nodelets library
add_library(openni_nodelet src/nodelets/driver.cpp)
target_link_libraries(openni_nodelet openni_driver ${catkin_LIBRARIES} ${Boost_LIBRARIES})
add_dependencies(openni_nodelet ${PROJECT_NAME}_gencfg)
# Node version of ROS driver
add_executable(openni_node src/nodes/openni_node.cpp)
target_link_libraries(openni_node openni_driver ${catkin_LIBRARIES} ${Boost_LIBRARIES})
add_dependencies(openni_node ${PROJECT_NAME}_gencfg)
install(TARGETS openni_driver openni_nodelet openni_node
ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
)
install(DIRECTORY include/${PROJECT_NAME}/
DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}
)
# add xml file
install(FILES openni_nodelets.xml
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
)