-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathCMakeLists.txt
72 lines (60 loc) · 1.47 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
cmake_minimum_required(VERSION 3.10)
project(
"CV_Project"
VERSION 0.1.0
LANGUAGES C CXX
)
# Standard CMake modules
include(CTest)
include(CMakeDependentOption)
include(GNUInstallDirs)
include(InstallRequiredSystemLibraries)
include(CMakePackageConfigHelpers)
# Custom modules and scripts
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake")
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
include(opencv)
include(pcl)
include(eigen)
include(ceres)
include(gtsam)
include(pangolin)
include(utils)
#include(...)
set(CMAKE_CXX_STANDARD 17)
message(STATUS "-std=C++17")
set(CMAKE_CXX_FLAGS "-Wall -Wextra")
set(CMAKE_CXX_FLAGS "-O0")
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
message(STATUS "-Wall -Wextra -O0")
# 3rdParty dependencies
#add_subdirectory(third_party EXCLUDE_FROM_ALL)
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
# csv reader depdency
set(THREADS_PREFER_PTHREAD_FLAG ON)
find_package(Threads REQUIRED)
find_package (Eigen3 3.3 REQUIRED NO_MODULE)
set(BIN_FILE solution)
set(BIN_FOLDER_PATH bin/)
set(3RDPARTY_PATH 3rdParty/)
include_directories(
include/
${CMAKE_CURRENT_SOURCE_DIR}/src
include/fast-cpp-csv-parser/
${Eigen3_INCLUDE_DIRS}
)
add_executable(${BIN_FILE}
src/main.cpp
)
set_target_properties(${BIN_FILE} PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${BIN_FOLDER_PATH})
target_link_libraries(
${BIN_FILE}
${THREAD_LIBS}
${OpenCV_LIBS}
${EIGEN_LIBS}
${PCL_LIBS}
${CERES_LIBS}
${GTSAM_LIBS}
${SPDLOG_LIBS}
${Pangolin_LIBRARIES}
)