forked from ros-drivers/microstrain_mips
-
Notifications
You must be signed in to change notification settings - Fork 77
/
CMakeLists.txt
85 lines (73 loc) · 2.52 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
cmake_minimum_required(VERSION 3.0.2)
project(microstrain_inertial_rqt)
## Find catkin macros and libraries
## if COMPONENTS list like find_package(catkin REQUIRED COMPONENTS xyz)
## is used, also find other catkin packages
find_package(catkin REQUIRED COMPONENTS
rospy
tf
rqt_gui
rqt_gui_py
std_msgs
nav_msgs
geometry_msgs
microstrain_inertial_msgs
)
# Locate the common code and messages
set(COMMON_NAME "microstrain_inertial_rqt_common")
set(COMMON_DIR "${${PROJECT_NAME}_SOURCE_DIR}/${COMMON_NAME}")
# Make sure that the submodule has been properly initialized
if(NOT EXISTS "${COMMON_DIR}/resource")
message(STATUS "Initializing ${COMMON_DIR} submodule. This should only happen once.")
# Make sure we can find the git executable
find_package(Git)
if(NOT Git_FOUND)
message(FATAL_ERROR "Unable to initialize submodule because we could not find the git executable. Please clone this repo using 'git clone --recursive'")
endif()
# Initialize and update the submodule )
execute_process(
WORKING_DIRECTORY "${${PROJECT_NAME}_SOURCE_DIR}"
COMMAND ${CMAKE_COMMAND} -E env ${GIT_EXECUTABLE} submodule update --recursive --init
)
endif()
## Uncomment this if the package has a setup.py. This macro ensures
## modules and global scripts declared therein get installed
## See http://ros.org/doc/api/catkin/html/user_guide/setup_dot_py.html
catkin_python_setup()
###################################
## catkin specific configuration ##
###################################
## The catkin_package macro generates cmake config files for your package
## Declare things to be passed to dependent projects
## INCLUDE_DIRS: uncomment this if your package contains header files
## LIBRARIES: libraries you create in this project that dependent projects also need
## CATKIN_DEPENDS: catkin_packages dependent projects also need
## DEPENDS: system dependencies of this project that dependent projects also need
catkin_package(
CATKIN_DEPENDS
rospy
tf
rqt_gui
rqt_gui_py
std_msgs
nav_msgs
geometry_msgs
microstrain_inertial_msgs
)
#############
## Install ##
#############
# all install targets should use catkin DESTINATION variables
# See http://ros.org/doc/api/catkin/html/adv_user_guide/variables.html
install(DIRECTORY
${COMMON_NAME}/resource
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/${COMMON_NAME}
)
install(DIRECTORY
launch
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
)
install(FILES
${COMMON_NAME}/plugin.xml
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/${COMMON_NAME}
)