-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
55 lines (42 loc) · 1.51 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
cmake_minimum_required(VERSION 3.5)
project(sfm)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED TRUE)
add_compile_options(-std=c++11)
find_package(OpenCV REQUIRED)
find_package(Eigen3 REQUIRED)
find_package(GTSAM REQUIRED)
include_directories(
include
${OpenCV_INCLUDE_DIRS}
${EIGEN3_INCLUDE_DIR}
${GTSAM_INCLUDE_DIR}
)
enable_testing()
# Find GTSAM components
find_package(GTSAM REQUIRED) # Uses installed package
# set(GTSAM_LIBRARIES gtsam) # TODO: automatic search libs
find_package(GTSAMCMakeTools)
include(GtsamMakeConfigFile)
include(GtsamBuildTypes)
include(GtsamTesting)
# for unittest scripts
# set(CMAKE_MODULE_PATH "${CMAKE_MODULE_PATH}" "${GTSAM_DIR}/../GTSAMCMakeTools")
# Boost - same requirement as gtsam
find_package(Boost REQUIRED COMPONENTS thread system chrono timer date_time filesystem serialization)
include_directories(${Boost_INCLUDE_DIR})
# Process source subdirs
# set(SOURCE_FILES sfm.cpp)
# add_executable(featureMatch src/featurematching.cpp)
add_executable(sfm src/mysfm.cpp)
# add_executable(main src/main.cpp)
# link_directories(
# ${OpenCV_LIBRARY_DIRS}
# #${GTSAM_LIBRARY_DIRS}
# )
add_definitions(${OpenCV_DEFINITIONS} ${GTSAM_DEFINITIONS})
# target_link_libraries (featureMatch ${OpenCV_LIBRARIES})
target_link_libraries (sfm ${OpenCV_LIBRARIES} )#gtsam )
target_link_libraries (sfm Eigen3::Eigen)
# target_link_libraries (sfm Boost::chrono Boost::timer Boost::date_time Boost::filesystem Boost::serialization)
# target_link_libraries (main ${OpenCV_LIBRARIES})