-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
73 lines (53 loc) · 1.58 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
cmake_minimum_required(VERSION 2.8 FATAL_ERROR)
project(nonrigid_descriptor)
set(OpenCV_DIR /usr/local/share/OpenCV)
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Release)
endif()
set(CMAKE_CXX_FLAGS "-w") #"-Wall -Wextra")
set(CMAKE_BUILD_TYPE Release)
set(CMAKE_CXX_FLAGS_RELEASE "-O3")
find_package(PCL 1.8 REQUIRED)
find_package(OpenCV REQUIRED)
find_package(HDF5 REQUIRED COMPONENTS C CXX)
find_package(MPI)
if("${OpenCV_VERSION_MAJOR}" STREQUAL "4")
message("Using opencv 4")
add_definitions(-DCV4)
endif()
include_directories(${PCL_INCLUDE_DIRS})
include_directories(${PROJECT_SOURCE_DIR}/src/libgeodesic/include)
include_directories(${MPI_INCLUDE_PATH})
# libgeodesic
include_directories("/usr/local/include/")
include_directories("/usr/include/suitesparse/")
include_directories("/usr/include")
link_directories(${PCL_LIBRARY_DIRS})
include_directories(${PCL_INCLUDE_DIRS})
add_definitions(${PCL_DEFINITIONS})
include_directories(${PROJECT_SOURCE_DIR}/src/libgeodesic/include)
include_directories(${HDF5_INCLUDE_DIRS})
file(GLOB GEODESIC_SRC_FILES "${PROJECT_SOURCE_DIR}/src/libgeodesic/src/*.cpp")
file(GLOB SOURCES "${PROJECT_SOURCE_DIR}/src/*.cpp")
add_executable (nonrigid_descriptor ${SOURCES} ${GEODESIC_SRC_FILES})
target_link_libraries (nonrigid_descriptor
${PCL_LIBRARIES}
${OpenCV_LIBS}
${HDF5_CXX_LIBRARIES}
${HDF5_LIBRARIES}
${MPI_CXX_LIBRARIES}
spqr
umfpack
cholmod
colamd
ccolamd
camd
amd
m
suitesparseconfig
)
OPTION(NO_CONTRIB "Disable OpenCV contrib module" OFF)
if(NO_CONTRIB)
add_definitions(-DNO_CONTRIB)
message("Disabling OpenCV Contrib modules.")
endif()