forked from photoneo/phoxi_camera
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
174 lines (147 loc) · 3.33 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
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
cmake_minimum_required(VERSION 2.8.12)
project(phoxi_camera)
find_package(PhoXi REQUIRED CONFIG PATHS "$ENV{PHOXI_CONTROL_PATH}")
find_package(Eigen3 REQUIRED)
find_package(Boost REQUIRED COMPONENTS system)
find_package(catkin REQUIRED
COMPONENTS
roscpp
roslib
rospy
std_msgs
sensor_msgs
pcl_ros
pcl_conversions
dynamic_reconfigure
diagnostic_updater
geometry_msgs
eigen_conversions
cv_bridge
)
catkin_python_setup()
include_directories(include
${catkin_INCLUDE_DIRS}
${PHOXI_INCLUDE_DIRS}
${Eigen_INCLUDE_DIRS}
)
add_message_files(
FILES
PhoXiSize.msg
)
add_service_files(
FILES
Deprecated/Empty.srv #depricated
Deprecated/IsConnected.srv #depricated
Deprecated/IsAcquiring.srv #depricated
ConnectCamera.srv
TriggerImage.srv
GetDeviceList.srv
GetBool.srv
GetFrame.srv
GetHardwareIdentification.srv
GetSupportedCapturingModes.srv
SaveFrame.srv
SetCoordinatesSpace.srv
SetTransformationMatrix.srv
)
generate_messages(
DEPENDENCIES
std_msgs
sensor_msgs
)
generate_dynamic_reconfigure_options(
cfg/phoxi_camera.cfg
)
catkin_package(
CATKIN_DEPENDS
roscpp
message_runtime
std_msgs
sensor_msgs
)
add_compile_options(-w)
add_compile_options(-std=c++11)
add_compile_options(-fpermissive)
add_compile_options(-pthread)
add_library(
${PROJECT_NAME}_PhoXi_Interface
src/PhoXiInterface.cpp
)
add_library(
${PROJECT_NAME}_Ros_Interface
src/RosInterface.cpp
)
add_executable(
${PROJECT_NAME}
src/phoxi_camera_node.cpp
src/PhoXiInterface.cpp
src/RosInterface.cpp
)
add_dependencies(
${PROJECT_NAME}_Ros_Interface
${PROJECT_NAME}/_PhoXi_Interfece
${PROJECT_NAME}_gencfgv
${${PROJECT_NAME}_EXPORTED_TARGETS}
${catkin_EXPORTED_TARGETS}
)
add_dependencies(
${PROJECT_NAME}
${PROJECT_NAME}_gencfgv
${${PROJECT_NAME}_EXPORTED_TARGETS}
${catkin_EXPORTED_TARGETS}
)
target_link_libraries(
${PROJECT_NAME}_PhoXi_Interface
${PHOXI_LIBRARY}
rt
${Boost_LIBRARIES}
)
target_link_libraries(
${PROJECT_NAME}_Ros_Interface
${PROJECT_NAME}_PhoXi_Interface
${catkin_LIBRARIES}
)
target_link_libraries(
${PROJECT_NAME}
debug ${catkin_LIBRARIES}
optimized ${catkin_LIBRARIES}
${PHOXI_LIBRARY}
${Boost_LIBRARIES}
rt
)
install(
PROGRAMS
DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
)
install(
TARGETS
${PROJECT_NAME}
ARCHIVE
DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
LIBRARY
DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
RUNTIME
DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
)
install(
FILES
${PHOXI_LIB_RELEASE_PER_COMPILER}.${PHO_SOFTWARE_VERSION}
DESTINATION
${CATKIN_PACKAGE_LIB_DESTINATION}
)
install(PROGRAMS
test/interfaces/ros_utils.py
DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
)
if (CATKIN_ENABLE_TESTING)
find_package(rostest REQUIRED)
add_rostest(test/interfaces/launch/test_phoxi_camera_interfaces_exist.test)
add_rostest(test/interfaces/launch/test_phoxi_camera_ros_interfaces.test)
add_rostest_gtest(${PROJECT_NAME}_unittest
test/gtest/launch/test_phoxi_interface_class.test
test/gtest/test_phoxi_interface.cpp)
target_link_libraries(${PROJECT_NAME}_unittest
${catkin_LIBRARIES}
${PROJECT_NAME}_Ros_Interface
${PROJECT_NAME}_PhoXi_Interface)
endif()