-
Notifications
You must be signed in to change notification settings - Fork 35
/
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 3.8) # C++17 support was added in CMake 3.8
project(nuscenes2bag)
#set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_BUILD_TYPE Release) # Debug, Release, RelWithDebInfo
#find_package(Boost 1.58.0 COMPONENTS filesystem thread REQUIRED) # Ubuntu 16.04
find_package(Boost 1.65.0 COMPONENTS filesystem thread REQUIRED) # Ubuntu 18.04
find_package(catkin
REQUIRED
rosbag
sensor_msgs
cv_bridge
pcl_conversions
pcl_msgs
message_generation
geometry_msgs
std_msgs
nav_msgs
tf)
find_package(OpenCV REQUIRED core)
add_message_files(FILES RadarObjects.msg RadarObject.msg)
generate_messages(DEPENDENCIES
std_msgs
geometry_msgs
tf
nav_msgs)
catkin_package(INCLUDE_DIRS
include
thirdparty/json/
DEPENDS
OpenCV)
include_directories(SYSTEM
thirdparty/json/
${catkin_INCLUDE_DIRS}
${Boost_INCLUDE_DIRS}
${OpenCV_INCLUDE_DIRS})
include_directories(include)
find_package(PCL REQUIRED COMPONENTS common io)
set(SRCS
src/EgoPoseConverter.cpp
src/ImageDirectoryConverter.cpp
src/LidarDirectoryConverter.cpp
src/LidarDirectoryConverterXYZIR.cpp
src/RadarDirectoryConverter.cpp
src/NuScenes2Bag.cpp
src/FileProgress.cpp
src/MetaDataReader.cpp
src/MetaData.cpp
src/SceneConverter.cpp
src/utils.cpp)
add_executable(${PROJECT_NAME} ${SRCS} src/main.cpp)
target_compile_options(${PROJECT_NAME}
PRIVATE
-Wall
-Wextra
-pedantic
)
target_compile_definitions(${PROJECT_NAME} PRIVATE "-DCMAKE_CXX_STANDARD=${CMAKE_CXX_STANDARD}")
add_dependencies(${PROJECT_NAME} ${${PROJECT_NAME}_EXPORTED_TARGETS}
${catkin_EXPORTED_TARGETS})
target_link_libraries(${PROJECT_NAME}
${OpenCV_LIBRARIES}
${PCL_COMMON_LIBRARY}
${PCL_IO_LIBRARY}
${catkin_LIBRARIES})
install(DIRECTORY include/${PROJECT_NAME}/ thirdparty/json/
DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}
FILES_MATCHING
PATTERN "*.h"
PATTERN ".svn" EXCLUDE)