-
Notifications
You must be signed in to change notification settings - Fork 82
/
CMakeLists.txt
64 lines (50 loc) · 1.43 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
cmake_minimum_required(VERSION 2.8)
project(kfusion)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
find_package(CUDA REQUIRED)
find_package(TooN REQUIRED)
find_package(OpenGL)
find_package(Freenect)
find_package(GLUT)
include_directories(
${CMAKE_BINARY_DIR}/include
${TOON_INCLUDE_PATHS}
)
cuda_add_executable(devicequery
devicequery.cpp
)
set(kfusion_cuda_srcs
helpers.cu
helpers.h
kfusion.cu
kfusion.h
cutil_math.h
)
cuda_add_library(kfusion STATIC
${kfusion_cuda_srcs}
perfstats.h
OPTIONS
-O3
)
if (GLUT_FOUND)
include_directories(${GLUT_INCLUDE_DIR})
add_executable(kfusion_test
test.cpp
)
target_link_libraries(kfusion_test kfusion ${GLUT_LIBRARIES} ${OPENGL_LIBRARIES})
if(FREENECT_FOUND)
include_directories(${FREENECT_INCLUDE_PATHS})
add_definitions(-DLIBFREENECT_INTERFACE)
add_executable(kfusion_kinect
kinect.cpp interface.h interface.cpp
)
target_link_libraries(kfusion_kinect kfusion ${GLUT_LIBRARIES} ${OPENGL_LIBRARIES} ${FREENECT_LIBRARIES})
else()
include_directories($ENV{KINECTSDK10_DIR}/inc)
add_definitions(-DMS_KINECT_INTERFACE)
add_executable(kfusion_kinect
kinect.cpp interface.h interface.cpp
)
target_link_libraries(kfusion_kinect kfusion ${GLUT_LIBRARIES} ${OPENGL_LIBRARIES} $ENV{KINECTSDK10_DIR}/lib/amd64/Kinect10.lib)
endif()
endif()