forked from Field-Robotics-Lab/nps_uw_sensors_gazebo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
59 lines (50 loc) · 1.46 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
cmake_minimum_required(VERSION 3.0.2)
project(nps_uw_sensors_gazebo)
if(NOT "${CMAKE_VERSION}" VERSION_LESS "3.16")
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
else()
add_compile_options(-std=c++11)
endif()
find_package(catkin REQUIRED COMPONENTS
tf
gazebo_plugins)
find_package(gazebo REQUIRED)
find_package(roscpp REQUIRED)
find_package(std_msgs REQUIRED)
find_package(OpenCV REQUIRED)
include_directories(${roscpp_INCLUDE_DIRS})
include_directories(${std_msgs_INCLUDE_DIRS})
include_directories(${OpenCV_INCLUDE_DIRS})
include_directories(
include
${catkin_INCLUDE_DIRS}
${GAZEBO_INCLUDE_DIRS}
)
link_directories(${GAZEBO_LIBRARY_DIRS})
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${GAZEBO_CXX_FLAGS}")
set(SENSOR_ROS_PLUGINS_LIST "")
catkin_package(
INCLUDE_DIRS
LIBRARIES
CATKIN_DEPENDS
)
## Plugins
add_library(gazebo_ros_pulse_lidar_plugin src/gazebo_ros_pulse_lidar.cpp)
target_link_libraries(gazebo_ros_pulse_lidar_plugin
${GAZEBO_LIBRARIES} ${roscpp_LIBRARIES})
# Install plugins
install(
TARGETS ${SENSOR_ROS_PLUGINS_LIST}
DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
)
# for launch
install(DIRECTORY launch
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
PATTERN "*~" EXCLUDE)
# for Python scripts
catkin_install_python(PROGRAMS
src/simple_box_motion.py
src/simple_motion.py
DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION})