-
Notifications
You must be signed in to change notification settings - Fork 2
/
CMakeLists.txt
89 lines (70 loc) · 2.46 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
cmake_minimum_required(VERSION 2.8.3)
project(pfuclt_omni_dataset)
IF(NOT CMAKE_BUILD_TYPE)
SET(CMAKE_BUILD_TYPE Release)
ENDIF()
MESSAGE("Build type: " ${CMAKE_BUILD_TYPE})
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -O3")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -O3")
OPTION(USE_OpenMP "Use OpenMP" ON)
IF(USE_OpenMP)
FIND_PACKAGE(OpenMP)
IF(OPENMP_FOUND)
message(STATUS "OPENMP FOUND")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
SET(OpenMP_LIBS gomp)
ENDIF()
ENDIF()
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/CMakeModules")
find_package(
cmake_modules REQUIRED
catkin REQUIRED dynamic_reconfigure
)
#external includes
INCLUDE_DIRECTORIES(include)
#build library for minicsv
add_library(minicsv src/minicsv.cpp)
find_package(catkin REQUIRED COMPONENTS
roscpp
rospy
std_msgs
tf
geometry_msgs
nav_msgs
message_generation
tf2
tf2_ros
dynamic_reconfigure
)
FIND_PACKAGE(read_omni_dataset REQUIRED)
INCLUDE_DIRECTORIES(${read_omni_dataset_INCLUDE_DIRS})
generate_dynamic_reconfigure_options(
config/Dynamic.cfg
)
INCLUDE_DIRECTORIES(${catkin_INCLUDE_DIRS} include)
## Generate messages in the 'msg' folder
add_message_files(
FILES
particle.msg
particles.msg
)
generate_messages(
DEPENDENCIES
geometry_msgs
)
catkin_package(
INCLUDE_DIRS include
# CATKIN_DEPENDS roscpp rospy
CATKIN_DEPENDS std_msgs roscpp read_omni_dataset
# DEPENDS system_lib
)
FIND_PACKAGE(Eigen3 REQUIRED)
INCLUDE_DIRECTORIES(${Eigen3_INCLUDE_DIRS})
find_package(Boost REQUIRED)
include_directories(${Boost_INCLUDE_DIRS})
set(HEADER_FILES include/pfuclt_omni_dataset/pfuclt_aux.h include/pfuclt_omni_dataset/pfuclt_omni_dataset.h include/pfuclt_omni_dataset/pfuclt_particles.h include/pfuclt_omni_dataset/pfuclt_publisher.h)
set(SOURCE_FILES src/pfuclt_omni_dataset.cpp src/pfuclt_aux.cpp src/pfuclt_particles.cpp src/pfuclt_publisher.cpp)
add_executable(pfuclt_omni_dataset ${HEADER_FILES} ${SOURCE_FILES})
target_compile_options(pfuclt_omni_dataset PRIVATE ${OpenMP_FLAGS})
add_dependencies(pfuclt_omni_dataset pfuclt_omni_dataset_generate_messages_cpp pfuclt_omni_dataset_gencfg ${catkin_EXPORTED_TARGETS})
target_link_libraries(pfuclt_omni_dataset ${catkin_LIBRARIES} ${rosbag_LIBRARIES} ${Eigen3_LIBRARIES} ${Boost_LIBRARIES} ${read_omni_dataset_LIBRARIES} minicsv ${OpenMP_LIBS})