CMakeLists.txt 1.61 KB
Newer Older
Ken Tossell's avatar
Ken Tossell committed
1
2
3
4
# http://ros.org/doc/groovy/api/catkin/html/user_guide/supposed.html
cmake_minimum_required(VERSION 2.8.3)
project(libuvc_camera)
# Load catkin and all dependencies required for this package
5
find_package(catkin REQUIRED COMPONENTS roscpp camera_info_manager dynamic_reconfigure image_transport nodelet sensor_msgs)
6
7

generate_dynamic_reconfigure_options(cfg/UVCCamera.cfg)
Ken Tossell's avatar
Ken Tossell committed
8

9
10
find_package(libuvc REQUIRED)

11
12
13
14
15
16
17
18
19
20
catkin_package(
  CATKIN_DEPENDS
    roscpp
    camera_info_manager
    dynamic_reconfigure
    image_transport
    nodelet
    sensor_msgs
  LIBRARIES libuvc_camera_nodelet
  )
Ken Tossell's avatar
Ken Tossell committed
21

root's avatar
root committed
22
include_directories(include ${libuvc_INCLUDE_DIRS} ${Boost_INCLUDE_DIR} ${catkin_INCLUDE_DIRS})
Ken Tossell's avatar
Ken Tossell committed
23
link_directories(${catkin_LINK_DIRS})
Ken Tossell's avatar
Ken Tossell committed
24

Ken Tossell's avatar
Ken Tossell committed
25
26
find_package(Boost REQUIRED COMPONENTS thread)
include_directories(${Boost_INCLUDE_DIRS})
Ken Tossell's avatar
Ken Tossell committed
27

Ken Tossell's avatar
Ken Tossell committed
28
add_executable(camera_node src/main.cpp src/camera_driver.cpp)
root's avatar
root committed
29
target_link_libraries(camera_node ${libuvc_LIBRARIES} ${Boost_LIBRARIES} ${catkin_LIBRARIES})
30
add_dependencies(camera_node ${PROJECT_NAME}_gencfg)
Ken Tossell's avatar
Ken Tossell committed
31

Ken Tossell's avatar
Ken Tossell committed
32
add_library(libuvc_camera_nodelet src/nodelet.cpp src/camera_driver.cpp)
33
add_dependencies(libuvc_camera_nodelet ${libuvc_camera_EXPORTED_TARGETS})
root's avatar
root committed
34
target_link_libraries(libuvc_camera_nodelet ${libuvc_LIBRARIES} ${Boost_LIBRARIES} ${catkin_LIBRARIES})
35
add_dependencies(libuvc_camera_nodelet ${PROJECT_NAME}_gencfg)
36
37
38
39

install(TARGETS camera_node libuvc_camera_nodelet
  ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
  LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
40
  RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
41
  )
v4hn's avatar
v4hn committed
42
43
44
45

install(FILES libuvc_camera_nodelet.xml
  DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
  )