-
Notifications
You must be signed in to change notification settings - Fork 28
/
Copy pathCMakeLists.txt
73 lines (64 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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
cmake_minimum_required(VERSION 2.8)
project(dip)
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules/" ${CMAKE_MODULE_PATH})
set(BIN_INSTALL_DIR "bin")
set(LIB_INSTALL_DIR "lib")
set(INCLUDE_INSTALL_DIR "include/${PROJECT_NAME}")
#add_definitions(-DSOFTKINETIC)
if(WIN32)
set(CUDA_ATTACH_VS_BUILD_RULE_TO_CUDA_FILE OFF)
endif()
if(UNIX)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
set(BUILD_SHARED_LIBS true)
endif()
# CUDA
find_package(CUDA REQUIRED)
set(CUDA_NVCC_FLAGS "${CUDA_NVCC_FLAGS} -arch=sm_20")
if(UNIX)
set(CUDA_PROPAGATE_HOST_FLAGS false)
endif()
# DepthSense
find_package(DepthSense REQUIRED)
# Eigen
find_package(Eigen REQUIRED)
# GLEW
find_package(GLEW REQUIRED)
# GLFW
find_package(GLFW REQUIRED)
# HDF5
find_package(HDF5 REQUIRED NO_MODULE)
# OpenCV
find_package(OpenCV REQUIRED)
# OpenGL
find_package(OpenGL REQUIRED)
# OpenNI
find_package(OpenNI2 REQUIRED)
# OpenMP
find_package(OpenMP)
if (OPENMP_FOUND)
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
endif()
# X11
if(UNIX)
find_package(X11 REQUIRED)
set(X11_LIBS ${X11_Xrandr_LIB} ${X11_Xxf86vm_LIB} ${X11_Xi_LIB} ${X11_Xinerama_LIB} ${X11_Xcursor_LIB})
endif()
set(MODULE_NAMES
cameras
common
filters
io
point_cloud
projects
registration
sampling
segmentation
surface
visualization
)
foreach(MODULE_NAME ${MODULE_NAMES})
add_subdirectory(${MODULE_NAME})
endforeach(MODULE_NAME)
add_subdirectory(applications)