-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
115 lines (97 loc) · 4.02 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
cmake_minimum_required(VERSION 3.0.2)
project(ue4_ros_drivers)
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Release)
endif()
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
add_compile_options(-Wall)
find_package(catkin REQUIRED COMPONENTS
geometry_msgs
nav_msgs
sensor_msgs
mavros_msgs
tf2
tf
rosgraph_msgs
)
find_package(Eigen3 REQUIRED)
catkin_package(
INCLUDE_DIRS
include
LIBRARIES
${PROJECT_NAME}
CATKIN_DEPENDS
roscpp
nodelet
pluginlib
nav_msgs
geometry_msgs
mavros_msgs
tf2
tf
rosgraph_msgs
DEPENDS
EIGEN3
)
include_directories(
include
${catkin_INCLUDE_DIRS}
)
add_library(image_driver_nodelet src/image_driver_nodelet.cpp)
target_include_directories(image_driver_nodelet PUBLIC include ${catkin_INCLUDE_DIRS})
target_link_libraries(image_driver_nodelet PUBLIC ${catkin_LIBRARIES} Eigen3::Eigen)
add_dependencies(image_driver_nodelet ${catkin_EXPORTED_TARGETS} ${${PROJECT_NAME}_EXPORTED_TARGETS})
install(
TARGETS image_driver_nodelet
ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION})
add_library(imu_driver_nodelet src/imu_driver_nodelet.cpp)
target_include_directories(imu_driver_nodelet PUBLIC include ${catkin_INCLUDE_DIRS})
target_link_libraries(imu_driver_nodelet PUBLIC ${catkin_LIBRARIES} Eigen3::Eigen)
add_dependencies(imu_driver_nodelet ${catkin_EXPORTED_TARGETS} ${${PROJECT_NAME}_EXPORTED_TARGETS})
install(
TARGETS imu_driver_nodelet
ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION})
add_library(lidar_driver_nodelet src/lidar_driver_nodelet.cpp)
target_include_directories(lidar_driver_nodelet PUBLIC include ${catkin_INCLUDE_DIRS})
target_link_libraries(lidar_driver_nodelet PUBLIC ${catkin_LIBRARIES} Eigen3::Eigen)
add_dependencies(lidar_driver_nodelet ${catkin_EXPORTED_TARGETS} ${${PROJECT_NAME}_EXPORTED_TARGETS})
install(
TARGETS lidar_driver_nodelet
ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION})
add_library(control_driver_nodelet src/control_driver_nodelet.cpp)
target_include_directories(control_driver_nodelet PUBLIC include ${catkin_INCLUDE_DIRS})
target_link_libraries(control_driver_nodelet PUBLIC ${catkin_LIBRARIES} Eigen3::Eigen)
add_dependencies(control_driver_nodelet ${catkin_EXPORTED_TARGETS} ${${PROJECT_NAME}_EXPORTED_TARGETS})
install(
TARGETS control_driver_nodelet
ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION})
add_library(groundtruth_driver_nodelet src/groundtruth_driver_nodelet.cpp)
target_include_directories(groundtruth_driver_nodelet PUBLIC include ${catkin_INCLUDE_DIRS})
target_link_libraries(groundtruth_driver_nodelet PUBLIC ${catkin_LIBRARIES} Eigen3::Eigen)
add_dependencies(groundtruth_driver_nodelet ${catkin_EXPORTED_TARGETS} ${${PROJECT_NAME}_EXPORTED_TARGETS})
install(
TARGETS groundtruth_driver_nodelet
ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION})
add_library(tf_publish_nodelet src/tf_publish_nodelet.cpp)
target_include_directories(tf_publish_nodelet PUBLIC include ${catkin_INCLUDE_DIRS})
target_link_libraries(tf_publish_nodelet PUBLIC ${catkin_LIBRARIES} Eigen3::Eigen)
add_dependencies(tf_publish_nodelet ${catkin_EXPORTED_TARGETS} ${${PROJECT_NAME}_EXPORTED_TARGETS})
install(
TARGETS tf_publish_nodelet
ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION})
install(DIRECTORY include/${PROJECT_NAME}/ DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION})
install(FILES nodelet_plugin.xml DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION})