-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
60 lines (44 loc) · 1.28 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
cmake_minimum_required(VERSION 2.8.3)
project(um7)
find_package(catkin REQUIRED COMPONENTS roscpp serial sensor_msgs message_generation)
add_service_files(
FILES
Reset.srv
)
generate_messages()
catkin_package(
INCLUDE_DIRS include
CATKIN_DEPENDS message_runtime
)
###########
## Build ##
###########
## Specify additional locations of header files
## Your package locations should be listed before other locations
include_directories(include
${catkin_INCLUDE_DIRS}
)
## Declare a cpp executable
add_executable(um7_driver src/main.cpp src/registers.cpp src/comms.cpp)
target_link_libraries(um7_driver ${catkin_LIBRARIES} )
add_dependencies(um7_driver um7_generate_messages_cpp)
#############
## Install ##
#############
install(TARGETS um7_driver
RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
)
##########
## Docs ##
##########
add_custom_target (${PROJECT_NAME}_doc
rosdoc_lite -o ${CATKIN_DEVEL_PREFIX}/doc/${PROJECT_NAME} ${CATKIN_DEVEL_PREFIX}/../src/${PROJECT_NAME}
)
FILE(GLOB LINT_SRCS src/*.cpp include/um7/*.h)
FILE(GLOB NOLINT_SRCS include/um7/firmware_registers.h)
LIST(REMOVE_ITEM LINT_SRCS ${NOLINT_SRCS})
add_custom_target(${PROJECT_NAME}_cpplint
COMMAND cpplint --filter=-whitespace/line_length ${LINT_SRCS})
#############
## Testing ##
#############