-
Notifications
You must be signed in to change notification settings - Fork 3
/
CMakeLists.txt
executable file
·68 lines (53 loc) · 1.74 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
cmake_minimum_required(VERSION 3.2)
project(blackfly)
set(CMAKE_CXX_FLAGS "-std=c++11 ${CMAKE_CXX_FLAGS}")
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${PROJECT_SOURCE_DIR}/cmake)
find_package(catkin REQUIRED COMPONENTS
roscpp
camera_info_manager
sensor_msgs
std_msgs
cv_bridge
image_transport
nodelet
dynamic_reconfigure
)
find_package(OpenCV REQUIRED)
generate_dynamic_reconfigure_options(
cfg/BlackFly.cfg
)
catkin_package(
INCLUDE_DIRS include
LIBRARIES ${PROJECT_NAME}_nodelet
CATKIN_DEPENDS roscpp nodelet camera_info_manager sensor_msgs std_msgs cv_bridge image_transport dynamic_reconfigure
DEPENDS OpenCV
)
include(cmake/FindSpinnaker.cmake)
message(STATUS "libSpinnaker library: ${Spinnaker_LIBRARIES}")
message(STATUS "libSpinnaker include: ${Spinnaker_INCLUDE_DIRS}")
include_directories(SYSTEM
${Spinnaker_INCLUDE_DIRS}
${catkin_INCLUDE_DIRS}
${OpenCV_INCLUDE_DIRS})
include_directories(include)
## Create the nodelet blackfly library
add_library(${PROJECT_NAME}_nodelet
src/blackfly_nodelet.cpp
)
target_link_libraries(${PROJECT_NAME}_nodelet
${Spinnaker_LIBRARIES}
${catkin_LIBRARIES}
${OpenCV_LIBRARIES}
)
add_dependencies(${PROJECT_NAME}_nodelet
${catkin_EXPORTED_TARGETS}
${${PROJECT_NAME}_EXPORTED_TARGETS}
)
## Mark the nodelet library for installations
install(TARGETS ${PROJECT_NAME}_nodelet
DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION})
## Mark other files for installation (e.g. launch and bag files, etc.)
install(FILES nodelet_plugins.xml
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION})
install(DIRECTORY launch
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION})