forked from coincar-sim/sim_sample_communication_ros_tool
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
100 lines (85 loc) · 2.85 KB
/
CMakeLists.txt
File metadata and controls
100 lines (85 loc) · 2.85 KB
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
set(MRT_PKG_VERSION 2.2)
# Modify only if you know what you are doing!
cmake_minimum_required(VERSION 2.8.12)
project(sim_sample_communication_ros_tool)
###################
## find packages ##
###################
find_package(mrt_cmake_modules REQUIRED)
include(UseMrtStdCompilerFlags)
include(UseMrtAutoTarget)
include(GatherDeps)
# Remove libs which cannot be found automatically
#list(REMOVE_ITEM DEPENDEND_PACKAGES <package name 1> <package name 2> ...)
find_package(AutoDeps REQUIRED COMPONENTS ${DEPENDEND_PACKAGES})
# Manually resolve removed dependend packages
#find_package(...)
# Mark files or folders for display in IDEs
mrt_add_to_ide(README.md .gitlab-ci.yml)
########################
## add python modules ##
########################
# This adds a python module if located under src/{PROJECT_NAME)
mrt_python_module_setup()
################################################
## Declare ROS messages, services and actions ##
################################################
# Add message, service and action files
glob_ros_files(add_message_files msg)
glob_ros_files(add_service_files srv)
glob_ros_files(add_action_files action)
# Generate added messages and services with any dependencies listed here
if (ROS_GENERATE_MESSAGES)
generate_messages(
DEPENDENCIES
#add dependencies here
#std_msgs
)
endif()
# Generate dynamic reconfigure options
file(GLOB PARAMS_FILES RELATIVE "${CMAKE_CURRENT_LIST_DIR}" "cfg/*.params" "cfg/*.cfg" "cfg/*.mrtcfg" "cfg/*.rosif")
if (PARAMS_FILES)
generate_ros_parameter_files(${PARAMS_FILES})
generate_ros_interface_files(${PARAMS_FILES})
endif ()
###################################
## catkin specific configuration ##
###################################
catkin_package(
)
###########
## Build ##
###########
# Add include and library directories
include_directories(
${mrt_INCLUDE_DIRS}
${catkin_INCLUDE_DIRS}
)
link_directories(
${mrt_LIBRARY_DIRS}
)
glob_folders(SRC_DIRECTORIES "${CMAKE_CURRENT_SOURCE_DIR}/src")
if (SRC_DIRECTORIES)
# Found subfolders, add executable for each subfolder
foreach(SRC_DIR ${SRC_DIRECTORIES})
mrt_add_node_and_nodelet(${SRC_DIR} FOLDER "src/${SRC_DIR}")
endforeach()
else()
# No subfolder found, add executable and python modules for src folder
mrt_add_node_and_nodelet(${PROJECT_NAME} FOLDER "src")
endif()
#############
## Install ##
#############
# Install all targets, headers by default and scripts and other files if specified (folders or files)
mrt_install(PROGRAMS scripts FILES launch rviz maps res data nodelet_plugins.xml plugin_description.xml)
#############
## Testing ##
#############
# Add test targets for cpp and python tests
if (CATKIN_ENABLE_TESTING)
# Include header in src folder via src/<pkgname>/<myheader>.h
include_directories("src")
mrt_add_ros_tests(test)
mrt_add_nosetests(test)
endif()