-
Notifications
You must be signed in to change notification settings - Fork 2
/
CMakeLists.txt
97 lines (84 loc) · 2.06 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
cmake_minimum_required(VERSION 2.8.3)
project(cognex_demo)
find_package(catkin REQUIRED COMPONENTS
geometry_msgs
industrial_extrinsic_cal
pcl_ros
ros_opcua_impl_freeopcua
roscpp
sensor_msgs
target_finder
tf2
)
find_package(OpenCV REQUIRED)
find_package(PCL REQUIRED)
catkin_package(
INCLUDE_DIRS
include
LIBRARIES
CATKIN_DEPENDS
geometry_msgs
pcl_ros
ros_opcua_impl_freeopcua
roscpp
sensor_msgs
target_finder
tf2
DEPENDS
OpenCV
)
include_directories(
include
${catkin_INCLUDE_DIRS}
${OpenCV_INCLUDE_DIRS}
${PCL_INCLUDE_DIRS}
)
add_library(plc_interface src/plc_interface.cpp)
target_link_libraries(plc_interface
${catkin_LIBRARIES}
)
add_executable(camera_info_publisher_node src/camera_info_publisher_node.cpp)
target_link_libraries(camera_info_publisher_node
${catkin_LIBRARIES}
)
add_executable(feature_detector_node src/feature_detector_node.cpp)
target_link_libraries(feature_detector_node
${catkin_LIBRARIES}
plc_interface
)
add_executable(location_solver_node src/location_solver_node.cpp)
target_link_libraries(location_solver_node
plc_interface
${catkin_LIBRARIES}
${OpenCV_LIBRARIES}
)
add_executable(plc_initializer src/plc_initializer.cpp)
target_link_libraries(plc_initializer
plc_interface
${catkin_LIBRARIES}
)
add_executable(pointcloud_publisher src/pointcloud_publisher.cpp)
target_link_libraries(pointcloud_publisher
${catkin_LIBRARIES}
${PCL_LIBRARIES}
)
# Mark cpp header files for installation
install(DIRECTORY include/${PROJECT_NAME}/
DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}
FILES_MATCHING PATTERN "*.h"
)
foreach(dir config launch support)
install(DIRECTORY ${dir}/
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/${dir})
endforeach()
install(TARGETS
camera_info_publisher_node
feature_detector_node
location_solver_node
plc_initializer
plc_interface
pointcloud_publisher
ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
)