forked from Lancelot899/ceres_icp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
88 lines (71 loc) · 1.9 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
79
80
81
82
83
84
85
86
87
88
cmake_minimum_required(VERSION 2.8)
project(icp)
set(CMAKE_CXX_STANDARD 11)
IF(CMAKE_COMPILER_IS_GNUCC)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3 -std=c++0x")
ELSE()
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
ENDIF()
INCLUDE(ExternalProject)
LIST(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake")
FIND_PACKAGE(G2O REQUIRED QUIET)
MESSAGE("-- find G2O")
FIND_PACKAGE(SuiteSparse REQUIRED)
MESSAGE("-- find SuiteSparse")
FIND_PACKAGE(Glog REQUIRED QUIET)
MESSAGE("-- find Glog")
FIND_PACKAGE(Cholmod REQUIRED QUIET)
MESSAGE("-- find Cholmod")
FIND_PACKAGE(BLAS REQUIRED QUIET)
MESSAGE("-- find blas")
FIND_PACKAGE(LAPACK REQUIRED QUIET)
MESSAGE("-- find lapack")
FIND_PACKAGE(Ceres REQUIRED QUIET)
MESSAGE("-- find Ceres")
FIND_PACKAGE(GLEW REQUIRED QUIET)
MESSAGE("-- find glew")
FIND_PACKAGE(Boost REQUIRED COMPONENTS thread random math_c99)
FIND_LIBRARY(GOMP_LIB
NAMES gomp libgomp.so.1
PATH
/usr/lib/x86_64-linux-gnu
/usr/lib
/usr/local/lib
)
set(SOURCE_FILES
main.cpp
ICPSimulation.cpp
ICPSimulation.h
)
INCLUDE_DIRECTORIES(
.
./Thirdparty
${GLOG_INCLUDE_DIR}
${CERES_INCLUDE_DIR}
${SuiteSparse_INCLUDE_DIRS}
${GLEW_INCLUDE_DIR}
${G2O_INCLUDE_DIRS}
)
FIND_LIBRARY(GLOG_LIB
NAMES glog glog.so libglog.so
PATH
/usr/lib/x86_64-linux-gnu
/opt/local/lib
/usr/lib
/usr/local/lib
)
LIST(APPEND LINK_LIBS
${GLOG_LIBRARIES}
${CERES_LIBRARIES}
${QGLVIEWER_LIBRARY_RELEASE}
${SUITESPARSE_LIBRARIES}
${CHOLMOD_LIBRARIES}
${LAPACK_LIBRARIES}
${BLAS_LIBRARIES}
${GLOG_LIB}
${G2O_CORE_LIBRARY}
${G2O_STUFF_LIBRARY}
${GOMP_LIB}
)
add_executable(icp ${SOURCE_FILES} ${UI_SOURCES})
TARGET_LINK_LIBRARIES(icp ${LINK_LIBS} pthread)