-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathCMakeLists.txt
120 lines (105 loc) · 2.58 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
cmake_minimum_required(VERSION 3.0.2)
project(cob_fiducials)
set(catkin_RUN_PACKAGES
cob_object_detection_msgs
cob_vision_utils
cv_bridge
diagnostic_msgs
diagnostic_updater
image_transport
roscpp
sensor_msgs
std_msgs
std_srvs
tf
visualization_msgs
)
set(catkin_BUILD_PACKAGES
cmake_modules
${catkin_RUN_PACKAGES}
)
find_package(catkin REQUIRED COMPONENTS
${catkin_BUILD_PACKAGES}
)
find_package(OpenCV REQUIRED)
find_package(TinyXML REQUIRED)
find_package(Boost REQUIRED COMPONENTS filesystem)
catkin_package(
INCLUDE_DIRS
common/include
LIBRARIES
${PROJECT_NAME}
CATKIN_DEPENDS
${catkin_RUN_PACKAGES}
DEPENDS
Boost
OpenCV
TinyXML
)
###########
## Build ##
###########
include_directories(
common/include
${catkin_INCLUDE_DIRS}
${OpenCV_INCLUDE_DIRS}
${TinyXML_INCLUDE_DIRS}
${Boost_INCLUDE_DIRS}
)
set(project_CPP_FILES
common/src/AbstractFiducialModel.cpp
common/src/aruco/FiducialModelAruco.cpp
common/src/aruco/arucofidmarkers.cpp
common/src/aruco/board.cpp
common/src/aruco/boarddetector.cpp
common/src/aruco/cameraparameters.cpp
common/src/aruco/cvdrawingutils.cpp
common/src/aruco/marker.cpp
common/src/aruco/markerdetector.cpp
common/src/pi/FiducialModelPi.cpp
)
add_library(${PROJECT_NAME}
${project_CPP_FILES}
)
add_dependencies(${PROJECT_NAME} ${catkin_EXPORTED_TARGETS})
target_link_libraries(${PROJECT_NAME}
${catkin_LIBRARIES}
${OpenCV_LIBS}
${TinyXML_LIBRARIES}
${Boost_LIBRARIES}
)
set_target_properties(${PROJECT_NAME} PROPERTIES COMPILE_FLAGS "-D__LINUX__ -DBOOST_FILESYSTEM_VERSION=2")
add_executable(fiducials
ros/src/fiducials.cpp
)
add_dependencies(fiducials ${catkin_EXPORTED_TARGETS})
target_link_libraries(fiducials
${PROJECT_NAME}
${catkin_LIBRARIES}
${OpenCV_LIBS}
${TinyXML_LIBRARIES}
${Boost_LIBRARIES}
)
set_target_properties(fiducials PROPERTIES COMPILE_FLAGS "-D__LINUX__ -DBOOST_FILESYSTEM_VERSION=2")
#############
## Install ##
#############
install(TARGETS ${PROJECT_NAME} fiducials
ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
)
install(DIRECTORY common/include/${PROJECT_NAME}/
DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}
FILES_MATCHING PATTERN "*.h"
)
install(DIRECTORY ros/launch
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/ros
)
install(DIRECTORY common/files
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/common
)
catkin_install_python(PROGRAMS
ros/scripts/fiducials_detector_service_client.py
DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
)