forked from OpenKinect/libfreenect
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
58 lines (47 loc) · 2.52 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
######################################################################################
# Packages needed for examples
######################################################################################
# These examples have no external dependencies and should always build.
add_executable(freenect-camtest camtest.c)
add_executable(freenect-wavrecord wavrecord.c)
target_link_libraries(freenect-camtest freenect)
target_link_libraries(freenect-wavrecord freenect)
install(TARGETS freenect-camtest freenect-wavrecord
DESTINATION bin)
# Most viewers need pthreads and GLUT.
set(THREADS_USE_PTHREADS_WIN32 true)
find_package(Threads)
find_package(OpenGL)
find_package(GLUT)
if (Threads_FOUND AND OPENGL_FOUND AND GLUT_FOUND)
include_directories(${THREADS_PTHREADS_INCLUDE_DIR} ${OPENGL_INCLUDE_DIR} ${GLUT_INCLUDE_DIR})
add_executable(freenect-glview glview.c)
add_executable(freenect-regview regview.c)
add_executable(freenect-hiview hiview.c)
add_executable(freenect-chunkview chunkview.c)
add_executable(freenect-micview micview.c)
target_link_libraries(freenect-glview freenect ${OPENGL_LIBRARIES} ${GLUT_LIBRARY} ${CMAKE_THREAD_LIBS_INIT} ${MATH_LIB})
target_link_libraries(freenect-regview freenect ${OPENGL_LIBRARIES} ${GLUT_LIBRARY} ${CMAKE_THREAD_LIBS_INIT} ${MATH_LIB})
target_link_libraries(freenect-hiview freenect ${OPENGL_LIBRARIES} ${GLUT_LIBRARY} ${CMAKE_THREAD_LIBS_INIT} ${MATH_LIB})
target_link_libraries(freenect-chunkview freenect ${OPENGL_LIBRARIES} ${GLUT_LIBRARY} ${CMAKE_THREAD_LIBS_INIT} ${MATH_LIB})
target_link_libraries(freenect-micview freenect ${OPENGL_LIBRARIES} ${GLUT_LIBRARY} ${CMAKE_THREAD_LIBS_INIT} ${MATH_LIB})
install(TARGETS freenect-glview freenect-regview freenect-hiview freenect-chunkview freenect-micview
DESTINATION bin)
endif ()
# A few examples use c_sync.
if (BUILD_C_SYNC)
include_directories(../wrappers/c_sync/)
add_executable(freenect-regtest regtest.c)
add_executable(freenect-tiltdemo tiltdemo.c)
target_link_libraries(freenect-regtest freenect_sync ${MATH_LIB})
target_link_libraries(freenect-tiltdemo freenect_sync ${MATH_LIB})
install(TARGETS freenect-regtest freenect-tiltdemo
DESTINATION bin)
if (OPENGL_FOUND AND GLUT_FOUND)
include_directories(${OPENGL_INCLUDE_DIR} ${GLUT_INCLUDE_DIR})
add_executable(freenect-glpclview glpclview.c)
target_link_libraries(freenect-glpclview freenect_sync ${OPENGL_LIBRARIES} ${GLUT_LIBRARY} ${MATH_LIB})
install(TARGETS freenect-glpclview
DESTINATION bin)
endif ()
endif ()