forked from UTNuclearRoboticsPublic/netft_utils
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
94 lines (71 loc) · 2.49 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
86
87
88
89
90
91
92
93
cmake_minimum_required(VERSION 2.8.3)
project(netft_utils)
set(GCC_COVERAGE_COMPILE_FLAGS "-g -Wno-enum-compare -std=c++11 -Wenum-compare -Wformat-security")
set(GCC_COVERAGE_LINK_FLAGS "-Wformat-security")
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${GCC_COVERAGE_COMPILE_FLAGS}" )
set( CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${GCC_COVERAGE_LINK_FLAGS}" )
# Use C++11
set(CMAKE_CXX_FLAGS "-std=c++0x ${CMAKE_CXX_FLAGS}")
find_package(catkin REQUIRED COMPONENTS
roscpp
diagnostic_updater
diagnostic_msgs
geometry_msgs
std_msgs
)
find_package(Boost REQUIRED COMPONENTS
system
thread
program_options
)
find_package(catkin REQUIRED COMPONENTS genmsg std_msgs tf message_generation)
include_directories(
include ${Boost_INCLUDE_DIRS}
${catkin_INCLUDE_DIRS}
)
## Generate messages in the 'msg' folder
add_message_files( FILES Cancel.msg )
add_service_files(
FILES
SetBias.srv
SetFilter.srv
SetMax.srv
SetThreshold.srv
SetToolData.srv
GetDouble.srv
StartSim.srv
StopSim.srv
)
generate_messages(DEPENDENCIES std_msgs geometry_msgs)
catkin_package(
INCLUDE_DIRS include
CATKIN_DEPENDS message_runtime
LIBRARIES netft_utils_lean lpfilter
DEPENDS
)
link_directories(${catkin_LIBRARY_DIRS})
add_library(netft_rdt_driver src/netft_rdt_driver.cpp)
add_library(lpfilter src/lpfilter.cpp)
add_library(netft_utils_lean src/netft_utils_lean.cpp)
add_dependencies(netft_utils_lean netft_utils_generate_messages_cpp)
target_link_libraries(netft_utils_lean lpfilter netft_rdt_driver)
target_link_libraries(netft_rdt_driver ${Boost_LIBRARIES} ${catkin_LIBRARIES})
add_executable(netft_utils src/netft_utils.cpp)
add_executable(netft_utils_sim src/netft_utils_sim.cpp)
add_executable(netft_utils_cpp_test src/netft_utils_cpp_test.cpp)
add_dependencies(netft_utils netft_utils_generate_messages_cpp lpfilter)
add_dependencies(netft_utils_sim netft_utils_generate_messages_cpp lpfilter)
add_dependencies(netft_utils_cpp_test ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS} netft_utils)
target_link_libraries(netft_utils
${catkin_LIBRARIES}
lpfilter
)
target_link_libraries(netft_utils_sim
${catkin_LIBRARIES}
lpfilter
)
target_link_libraries(netft_utils_cpp_test ${catkin_LIBRARIES} netft_utils_lean lpfilter netft_rdt_driver)
add_executable(netft_node src/netft_node.cpp)
target_link_libraries(netft_node netft_rdt_driver)
target_link_libraries(netft_node ${Boost_LIBRARIES})
target_link_libraries(netft_node ${catkin_LIBRARIES})