-
Notifications
You must be signed in to change notification settings - Fork 123
/
Copy pathCMakeLists.txt
79 lines (62 loc) · 2.17 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
project(carvig)
cmake_minimum_required(VERSION 2.8)
cmake_policy(SET CMP0015 NEW)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_BUILD_TYPE Debug)
set(CMAKE_CXX_FLAGS "-std=c++11 -O0 -fPIC")
set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
set(CMAKE_CXX_FLAGS "-msse3")
set(CMAKE_C_FLAGS "-msse3")
set(CMAKE_C_FLAGS "-mavx")
if("${CMAKE_BUILD_TYPE}" STREQUAL "")
SET(CMAKE_BUILD_TYPE "Release")
endif()
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/bin)
list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
find_package(OpenCV 3.0 QUIET)
if(NOT OpenCV_FOUND)
find_package(OpenCV 2.4.3 QUIET)
if(NOT OpenCV_FOUND)
message(FATAL_ERROR "OpenCV>2.4.3 not found.")
endif()
endif()
find_package(Eigen3 3.1.0 REQUIRED)
find_package(PythonLibs REQUIRED)
find_package(Boost REQUIRED)
include_directories(${PROJECT_SOURCE_DIR}
${PROJECT_SOURCE_DIR}/include
${PROJECT_SOURCE_DIR}/src/ins-gnss/rcv
${PROJECT_SOURCE_DIR}/src/libviso
${EIGEN3_INCLUDE_DIR}
)
include_directories(${PYTHON_INCLUDE_DIRS})
file(GLOB SRC_FILES "src/ins-gnss/*.cc" "src/ins-gnss/rcv/*.cc")
add_library(carvig ${SRC_FILES})
target_link_libraries(carvig blas lapack z pthread
/usr/local/lib/libpng.so
jpeg)
set_target_properties(carvig PROPERTIES ARCHIVE_OUTPUT_DIRECTORY
${PROJECT_SOURCE_DIR}/lib)
# add test
add_subdirectory(test)
# add relative pose estimate library
add_subdirectory(src/relative-pose)
# add libvisio
add_subdirectory(src/libviso)
add_executable(carvignav src/ins-gnss/app/igvonav.cc)
target_link_libraries(carvignav carvig pthread
${OpenCV_LIBS}
five-point-nister
viso)
add_executable(tc-postpos src/ins-gnss/app/tc-postpos.cc)
target_link_libraries(tc-postpos
carvig pthread
${OpenCV_LIBS}
five-point-nister
viso)
add_executable(rnx2rtkp src/ins-gnss/app/rnx2rtkp.cc)
target_link_libraries(rnx2rtkp
carvig pthread
${OpenCV_LIBS}
five-point-nister
viso)