-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
79 lines (66 loc) · 2.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
cmake_minimum_required(VERSION 3.16)
project(oculus_sonar VERSION 1.2)
find_package(catkin REQUIRED COMPONENTS
roscpp
rospy
std_msgs
sensor_msgs
message_generation
dynamic_reconfigure
)
generate_dynamic_reconfigure_options(${CMAKE_CURRENT_SOURCE_DIR}/cfg/OculusSonar.cfg)
find_package(oculus_driver QUIET)
if(NOT TARGET oculus_driver)
include(FetchContent)
FetchContent_Declare(oculus_driver
GIT_REPOSITORY https://github.com/ENSTABretagneRobotics/oculus_driver.git
GIT_TAG v1.2
)
FetchContent_MakeAvailable(oculus_driver)
endif()
add_message_files(FILES
OculusHeader.msg
OculusVersionInfo.msg
OculusStatus.msg
OculusFireConfig.msg
OculusPing.msg
OculusStampedPing.msg
Raw.msg
Ping.msg
)
## Generate added messages and services with any dependencies listed here
generate_messages(DEPENDENCIES
std_msgs
sensor_msgs
)
catkin_package(CATKIN_DEPENDS roscpp rospy std_msgs sensor_msgs)
# replace with target include directories ?
include_directories(${catkin_INCLUDE_DIRS})
add_executable(oculus_sonar_node
src/OculusNode.cpp
src/oculus_sonar_node.cpp
)
target_include_directories(oculus_sonar_node PRIVATE src)
target_link_libraries(oculus_sonar_node PRIVATE
${catkin_LIBRARIES}
oculus_driver
)
add_dependencies(oculus_sonar_node oculus_sonar_generate_messages_cpp ${PROJECT_NAME}_gencfg)
find_package(rtac_display QUIET)
if(TARGET rtac_display)
add_executable(oculus_sonar_display
src/FanRendererES.cpp
src/PingRenderer.cpp
src/oculus_sonar_display.cpp
)
target_include_directories(oculus_sonar_display PRIVATE src)
target_link_libraries(oculus_sonar_display PRIVATE
${catkin_LIBRARIES}
oculus_driver
rtac_display
)
add_dependencies(oculus_sonar_display oculus_sonar_generate_messages_cpp ${PROJECT_NAME}_gencfg)
endif()
# installing converter script
catkin_install_python(PROGRAMS scripts/bag_to_oculus
DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION})