forked from ros-naoqi/naoqi_driver
-
Notifications
You must be signed in to change notification settings - Fork 3
/
CMakeLists_catkin.txt
89 lines (77 loc) · 2.4 KB
/
CMakeLists_catkin.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
cmake_minimum_required(VERSION 2.8.3)
# Add pre-processor compile flag indicating catkin
add_definitions( -DCATKIN_BUILD )
# CMake file that uses catkin
find_package(catkin COMPONENTS
cv_bridge
diagnostic_msgs
diagnostic_updater
geometry_msgs
image_transport
kdl_parser
naoqi_bridge_msgs
naoqi_libqi
naoqi_libqicore
robot_state_publisher
rosbag_storage
rosconsole
rosgraph_msgs
sensor_msgs
tf2_geometry_msgs
tf2_msgs
tf2_ros
)
find_package(OpenCV)
find_package(orocos_kdl)
find_package(BZip2 REQUIRED)
add_definitions(${BZIP2_DEFINITIONS})
add_definitions(-DLIBQI_VERSION=${naoqi_libqi_VERSION_MAJOR}${naoqi_libqi_VERSION_MINOR})
catkin_package(LIBRARIES naoqi_driver_module naoqi_driver)
include_directories( include ${catkin_INCLUDE_DIRS})
# create the different libraries
add_library(
naoqi_driver_module
SHARED
src/autoload_registration.cpp
)
target_link_libraries(naoqi_driver_module ${naoqi_libqi_LIBRARIES})
install(TARGETS naoqi_driver_module DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION})
add_library(
naoqi_driver
SHARED
${DRIVER_SRC}
${CONVERTERS_SRC}
${PUBLISHER_SRC}
${SUBSCRIBER_SRC}
${SERVICES_SRC}
${RECORDER_SRC}
${TOOLS_SRC}
)
target_link_libraries(
naoqi_driver
${catkin_LIBRARIES}
${OpenCV_LIBRARIES}
${orocos_kdl_LIBRARIES}
)
add_dependencies(naoqi_driver ${catkin_EXPORTED_TARGETS})
install(TARGETS naoqi_driver DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION})
target_link_libraries(
naoqi_driver_module
naoqi_driver
)
# create the binary of the bridge
add_executable( naoqi_driver_node src/external_registration.cpp)
target_link_libraries(
naoqi_driver_node
naoqi_driver
${catkin_LIBRARIES}
)
install(TARGETS naoqi_driver_node DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION})
# install the urdf for runtime loading
file(COPY "${CMAKE_CURRENT_SOURCE_DIR}/share" DESTINATION "${CATKIN_DEVEL_PREFIX}/${CATKIN_PACKAGE_SHARE_DESTINATION}/")
install(DIRECTORY share DESTINATION "${CATKIN_PACKAGE_SHARE_DESTINATION}")
# install the launch files
install(DIRECTORY launch DESTINATION "${CATKIN_PACKAGE_SHARE_DESTINATION}")
# make sure there is a file describing a naoqi module
file(WRITE ${CATKIN_DEVEL_PREFIX}/${CATKIN_GLOBAL_SHARE_DESTINATION}/qi/module/naoqi_driver_module.mod "cpp")
install(FILES ${CATKIN_DEVEL_PREFIX}/${CATKIN_GLOBAL_SHARE_DESTINATION}/qi/module/naoqi_driver_module.mod DESTINATION ${CATKIN_GLOBAL_SHARE_DESTINATION}/qi/module/)