forked from udacity/SFND_Lidar_Obstacle_Detection
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
41 lines (32 loc) · 1.27 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
cmake_minimum_required(VERSION 2.8.12)
project(playback)
set(CXX_FLAGS "-Wall -std=c++20 -Wno-reorder")
set(CMAKE_CXX_FLAGS "${CXX_FLAGS}")
# Use dynamic linking for faster link times
set(BUILD_SHARED_LIBS ON)
# Optimization for debug builds
set(CMAKE_CXX_FLAGS_DEBUG "-Og -pipe -fdiagnostics-color=always -g1")
# Faster linking with gold linker or MSVC incremental linking
if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
set(CMAKE_EXE_LINKER_FLAGS "-fuse-ld=gold")
elseif(MSVC)
set(CMAKE_EXE_LINKER_FLAGS "/INCREMENTAL")
endif()
# Required dependencies
find_package(PCL REQUIRED COMPONENTS common io visualization segmentation)
find_package(Boost COMPONENTS filesystem REQUIRED)
find_package(spdlog REQUIRED)
find_package(Eigen3 3.3 REQUIRED NO_MODULE)
include_directories(${PCL_INCLUDE_DIRS} ${BOOST_INCLUDE_DIRS} ${CMAKE_CURRENT_SOURCE_DIR}/src)
link_directories(${PCL_LIBRARY_DIRS} ${Boost_LIBRARY_DIRS})
add_definitions(${PCL_DEFINITIONS} ${Boost_DEFINITIONS})
list(REMOVE_ITEM PCL_LIBRARIES "vtkproj4")
add_executable (environment src/environment.cpp src/render/render.cpp src/processPointClouds.cpp)
target_link_libraries (environment
${PCL_LIBRARIES}
${Boost_LIBRARIES}
spdlog::spdlog
Eigen3::Eigen
)
add_subdirectory(src/quiz/ransac)
add_subdirectory(src/quiz/cluster)