forked from inertialsense/inertial-sense-ros-old
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
68 lines (58 loc) · 1.57 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
cmake_minimum_required(VERSION 2.8.3)
project(inertial_sense_ros)
find_package(catkin REQUIRED COMPONENTS
roscpp
rospy
std_msgs
sensor_msgs
geometry_msgs
diagnostic_msgs
message_generation
tf
)
find_package(Threads)
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu11 -fms-extensions -Wl,--no-as-needed -DPLATFORM_IS_LINUX" )
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++11 -fms-extensions -Wl,--no-as-needed -DPLATFORM_IS_LINUX")
add_message_files(
FILES
GTime.msg
SatInfo.msg
GPS.msg
GPSInfo.msg
PreIntIMU.msg
RTKInfo.msg
RTKRel.msg
GlonassEphemeris.msg
GNSSEphemeris.msg
GNSSObservation.msg
GNSSObsVec.msg
INL2States.msg
)
add_service_files(
FILES
FirmwareUpdate.srv
refLLAUpdate.srv
)
generate_messages(
DEPENDENCIES
std_msgs
geometry_msgs
)
catkin_package(
INCLUDE_DIRS include
LIBRARIES inertial_sense_ros
CATKIN_DEPENDS roscpp sensor_msgs geometry_msgs
)
include_directories(include
${catkin_INCLUDE_DIRS}
lib/inertial-sense-sdk/src #This line of CMakeList.txt stays in .external file to reference submodule
)
add_subdirectory(lib/inertial-sense-sdk)
add_library(inertial_sense_ros
src/inertial_sense_ros.cpp
)
target_link_libraries(inertial_sense_ros InertialSense ${catkin_LIBRARIES} pthread)
target_include_directories(inertial_sense_ros PUBLIC include lib/inertial-sense-sdk/src)
add_dependencies(inertial_sense_ros inertial_sense_ros_generate_messages_cpp)
add_executable(inertial_sense_node src/inertial_sense_node.cpp)
target_link_libraries(inertial_sense_node inertial_sense_ros ${catkin_LIBRARIES})