forked from ifm/royale-ros
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
136 lines (112 loc) · 2.88 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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
cmake_minimum_required(VERSION 2.8.3)
project(royale_ros)
set(ROYALE_ROOT "/opt/royale" CACHE STRING "Root directory to Royale SDK")
find_package(royale
PATHS ${ROYALE_ROOT}/share
)
find_package(Boost REQUIRED)
if(royale_FOUND)
MESSAGE(STATUS "ROYALE_ROOT: " ${ROYALE_ROOT})
MESSAGE(STATUS "royale_LIB_DIR: " ${royale_LIB_DIR})
MESSAGE(STATUS "royale_LIBS: " ${royale_LIBS})
find_package(catkin REQUIRED COMPONENTS
nodelet
roscpp
message_generation
message_runtime
cv_bridge
image_transport
pcl_ros
sensor_msgs
tf2_ros
)
#######################################
## Declare ROS messages and services ##
#######################################
add_service_files(
FILES
Dump.srv
Config.srv
Start.srv
Stop.srv
)
add_message_files(
FILES
ExposureTimes.msg
SetExposureTime.msg
SetExposureTimes.msg
)
generate_messages(
DEPENDENCIES
std_msgs
)
###################################
## catkin specific configuration ##
###################################
catkin_add_env_hooks(royale_env SHELLS sh)
catkin_package(
INCLUDE_DIRS include
LIBRARIES royale_ros
CATKIN_DEPENDS roscpp nodelet
)
#############
## Build ##
#############
# getting ugly warning coming out of ros/time.h, silence them for now
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-conversion -std=c++14")
include_directories(
include
${ROYALE_ROOT}/include
${Boost_INCLUDE_DIRS}
${catkin_INCLUDE_DIRS}
)
link_directories(
${royale_LIB_DIR}
)
add_library(royale_ros src/camera_nodelet.cpp)
target_link_libraries(royale_ros
${catkin_LIBRARIES}
${royale_LIBS}
)
add_dependencies(royale_ros ${PROJECT_NAME}_generate_messages_cpp)
add_executable(lscam src/lscam.cpp)
target_link_libraries(lscam
${royale_LIBS}
)
add_dependencies(lscam ${PROJECT_NAME}_generate_messages_cpp)
add_executable(config src/config.cpp)
target_link_libraries(config
${catkin_LIBRARIES}
)
add_dependencies(config ${PROJECT_NAME}_generate_messages_cpp)
add_executable(dump src/dump.cpp)
target_link_libraries(dump
${catkin_LIBRARIES}
)
add_dependencies(dump ${PROJECT_NAME}_generate_messages_cpp)
#############
## Install ##
#############
install(TARGETS
royale_ros
config
dump
lscam
RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
)
install(DIRECTORY
include/${PROJECT_NAME}/
DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}
)
install(FILES nodelets.xml
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
)
install(DIRECTORY launch
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
)
######################
## Node-level tests ##
######################
endif()