-
Notifications
You must be signed in to change notification settings - Fork 40
/
Copy pathCMakeLists.txt
62 lines (54 loc) · 1.45 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
cmake_minimum_required(VERSION 2.8.3)
project(gnss_comm)
set(CMAKE_BUILD_TYPE "release")
set(CMAKE_CXX_FLAGS "-std=c++11 ")
set(CMAKE_CXX_FLAGS_RELEASE "-O3 -Wall -fPIC")
find_package(catkin REQUIRED COMPONENTS
roscpp
rospy
std_msgs
message_generation
)
file(GLOB_RECURSE message_files ${PROJECT_SOURCE_DIR}/msg/*.msg)
add_message_files(FILES
GnssTimeMsg.msg
GnssEphemMsg.msg
GnssGloEphemMsg.msg
GnssMeasMsg.msg
GnssObsMsg.msg
GnssBestXYZMsg.msg
GnssPVTSolnMsg.msg
GnssSvsMsg.msg
GnssTimePulseInfoMsg.msg
StampedFloat64Array.msg
)
generate_messages(
DEPENDENCIES std_msgs
)
catkin_package(
CATKIN_DEPENDS message_runtime
)
catkin_package(
INCLUDE_DIRS include
LIBRARIES ${PROJECT_NAME}
CATKIN_DEPENDS roscpp std_msgs message_generation
DEPENDS
)
set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
find_package(Eigen3 REQUIRED)
find_package(Glog REQUIRED)
include_directories(
${EIGEN3_INCLUDE_DIR}
${GLOG_INCLUDE_DIR}
${catkin_INCLUDE_DIRS}
${PROJECT_SOURCE_DIR}/include/${PROJECT_NAME}/
)
file(GLOB_RECURSE source_files ${PROJECT_SOURCE_DIR}/src/*.cpp)
add_library(${PROJECT_NAME} ${source_files})
target_include_directories(${PROJECT_NAME} PUBLIC
${EIGEN3_INCLUDE_DIR}
${catkin_INCLUDE_DIRS}
${PROJECT_SOURCE_DIR}/include/${PROJECT_NAME}/
)
target_link_libraries(${PROJECT_NAME} ${catkin_LIBRARIES} ${GLOG_LIBRARIES})
add_dependencies(${PROJECT_NAME} ${PROJECT_NAME}_generate_messages_cpp)