-
Notifications
You must be signed in to change notification settings - Fork 37
/
Copy pathCMakeLists.txt
executable file
·51 lines (40 loc) · 1.48 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
cmake_minimum_required(VERSION 3.5)
project(ARAP CXX C)
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_BUILD_TYPE Release)
# ceres-solver
find_package(Ceres REQUIRED)
include_directories(${CERES_INCLUDE_DIRS})
# glog
# find_package(glog REQUIRED)
# include_directories(${GLOG_INCLUDE_DIRS})
# OpenCV
find_package(OpenCV REQUIRED)
include_directories(${OpenCV_INCLUDE_DIRS})
# OpenMP
find_package(OpenMP)
message(STATUS "OpenMP flags = ${OpenMP_CXX_FLAGS}")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
# Eigen
find_package(Eigen)
include_directories(${Eigen_INCLUDE_DIRS})
set(ALL_LIBS glog gomp ${OpenCV_LIBS} ${CERES_LIBRARIES} ${Pangolin_LIBRARIES})
# Pangolin
if(DEFINED USE_GUI)
add_definitions(-DUSE_GUI)
find_package(Pangolin REQUIRED)
include_directories(${Pangolin_INCLUDE_DIRS})
set(ALL_LIBS ${ALL_LIBS} ${Pangolin_LIBRARIES})
endif()
file(GLOB LSQR_FILES src/Utils/LSQR/*)
file(GLOB OF_DIS_FILES src/Utils/FastOpticalFlow/*)
file(GLOB CORE_FILES src/Core/*)
file(GLOB UTILS_FILES src/Utils/*)
set(SOURCE_FILES ${OF_DIS_FILES} ${LSQR_FILES} ${CORE_FILES} ${UTILS_FILES})
add_executable(Display ${SOURCE_FILES} src/DisplayMain.cpp src/Reconstructor.cpp)
set_target_properties (Display PROPERTIES COMPILE_DEFINITIONS "SELECTMODE=1")
set_property(TARGET Display APPEND PROPERTY COMPILE_DEFINITIONS "SELECTCHANNEL=1") # use grey-valued image
target_link_libraries(Display ${ALL_LIBS})
# Test programs.
# include(AddTests.cmake)