forked from PRBonn/refusion
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
63 lines (50 loc) · 1.66 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
cmake_minimum_required(VERSION 2.8.3)
project(refusion)
add_compile_options(-std=c++11)
find_package(catkin REQUIRED)
find_package(CUDA REQUIRED)
set(OpenCV_DIR /usr/local/opencv3.4.1/share/OpenCV)
find_package(OpenCV 3.4.1 REQUIRED)
include_directories(SYSTEM ${OpenCV_INCLUDE_DIRS} /usr/local/opencv3.4.1/include)
link_directories(${OpenCV_LIBS} /usr/local/opencv3.4.1/lib)
find_package(Eigen3 REQUIRED)
set(CUDA_SEPARABLE_COMPILATION ON)
set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS};--std=c++11;-arch=sm_50;-O3)
catkin_package(
INCLUDE_DIRS src
LIBRARIES refusion
)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/bin)
include_directories(
src
${catkin_INCLUDE_DIRS}
${CUDA_INCLUDE_DIRS}
${OpenCV_INCLUDE_DIRS}
${EIGEN3_INCLUDE_DIRS}
)
add_library(eigen_wrapper src/tracker/eigen_wrapper.cpp)
cuda_add_library(refusion STATIC
src/utils/rgbd_image.cu
src/marching_cubes/mesh.cu
src/marching_cubes/mesh_extractor.cu
src/tsdfvh/heap.cu
src/tsdfvh/hash_table.cu
src/tsdfvh/tsdf_volume.cu
src/tracker/tracker.cu)
target_link_libraries(refusion eigen_wrapper ${CUDA_LIBRARIES})
add_executable(refusion_example src/example/example.cpp src/example/fr_parser.cpp)
target_link_libraries(refusion_example
refusion
${OpenCV_LIBS}
${CUDA_LIBRARIES}
)
# Generate API documentation with Doxygen
find_package(Doxygen)
if(DOXYGEN_FOUND)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in ${CMAKE_CURRENT_SOURCE_DIR}/docs/Doxyfile @ONLY)
add_custom_target(doc ALL
${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/docs/Doxyfile
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
COMMENT "Generating API documentation with Doxygen" VERBATIM
)
endif(DOXYGEN_FOUND)