Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions cmake_modules/SetupDirectories.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ MESSAGE (STATUS "${PROJECT_NAME} will be installed to ${CMAKE_INSTALL_PREFIX}")
# Installation prefix for include files
STRING (TOLOWER ${PROJECT_NAME} projectNameLower)
SET (PROJECT_INCLUDE_INSTALL_DIR "include/${projectNameLower}")
SET (PROJECT_MANPAGE_INSTALL_DIR "share/man")

IF (PROJECT_PROC_64BIT)
SET (LIB_SUFFIX "64" CACHE STRING "Suffix for library installation directory")
Expand Down
56 changes: 28 additions & 28 deletions examples/CMakeLists.txt
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,18 @@ if (WIN32)
include_directories(${THREADS_PTHREADS_INCLUDE_DIR})
endif()

add_executable(glview glview.c)
add_executable(regview regview.c)
add_executable(hiview hiview.c)
add_executable(freenect-glview glview.c)
add_executable(freenect-regview regview.c)
add_executable(freenect-hiview hiview.c)
if(BUILD_AUDIO)
add_executable(wavrecord wavrecord.c)
add_executable(micview micview.c)
add_executable(freenect-wavrecord wavrecord.c)
add_executable(freenect-micview micview.c)
endif()

if (BUILD_C_SYNC)
add_executable(glpclview glpclview.c)
add_executable(tiltdemo tiltdemo.c)
add_executable(regtest regtest.c)
add_executable(freenect-glpclview glpclview.c)
add_executable(freenect-tiltdemo tiltdemo.c)
add_executable(freenect-regtest regtest.c)
endif()

# We need to include libfreenect_sync.h for glpclview
Expand All @@ -37,17 +37,17 @@ include_directories (../wrappers/c_sync/)
# Mac just has everything already
if(APPLE)
set(CMAKE_EXE_LINKER_FLAGS "-framework OpenGL -framework GLUT")
target_link_libraries(glview freenect)
target_link_libraries(regview freenect)
target_link_libraries(hiview freenect)
target_link_libraries(freenect-glview freenect)
target_link_libraries(freenect-regview freenect)
target_link_libraries(freenect-hiview freenect)
if (BUILD_AUDIO)
target_link_libraries(wavrecord freenect)
target_link_libraries(micview freenect)
target_link_libraries(freenect-wavrecord freenect)
target_link_libraries(freenect-micview freenect)
endif()
if (BUILD_C_SYNC)
target_link_libraries(glpclview freenect_sync)
target_link_libraries(tiltdemo freenect_sync)
target_link_libraries(regtest freenect_sync)
target_link_libraries(freenect-glpclview freenect_sync)
target_link_libraries(freenect-tiltdemo freenect_sync)
target_link_libraries(freenect-regtest freenect_sync)
endif()
# Linux, not so much
else()
Expand All @@ -58,31 +58,31 @@ else()

include_directories(${OPENGL_INCLUDE_DIRS} ${GLUT_INCLUDE_DIRS} ${USB_INCLUDE_DIRS})

target_link_libraries(glview freenect ${OPENGL_LIBRARIES} ${GLUT_LIBRARY} ${CMAKE_THREAD_LIBS_INIT} ${MATH_LIB})
target_link_libraries(regview freenect ${OPENGL_LIBRARIES} ${GLUT_LIBRARY} ${CMAKE_THREAD_LIBS_INIT} ${MATH_LIB})
target_link_libraries(hiview freenect ${OPENGL_LIBRARIES} ${GLUT_LIBRARY} ${CMAKE_THREAD_LIBS_INIT} ${MATH_LIB})
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})
if (BUILD_AUDIO)
target_link_libraries(wavrecord freenect ${OPENGL_LIBRARIES} ${GLUT_LIBRARY} ${CMAKE_THREAD_LIBS_INIT} ${MATH_LIB})
target_link_libraries(micview freenect ${OPENGL_LIBRARIES} ${GLUT_LIBRARY} ${CMAKE_THREAD_LIBS_INIT} ${MATH_LIB})
target_link_libraries(freenect-wavrecord 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})
endif()
if (BUILD_C_SYNC)
target_link_libraries(glpclview freenect_sync ${OPENGL_LIBRARIES} ${GLUT_LIBRARY}
target_link_libraries(freenect-glpclview freenect_sync ${OPENGL_LIBRARIES} ${GLUT_LIBRARY}
${CMAKE_THREAD_LIBS_INIT} ${MATH_LIB})
target_link_libraries(tiltdemo freenect_sync ${CMAKE_THREAD_LIBS_INIT} ${MATH_LIB})
target_link_libraries(regtest freenect_sync ${CMAKE_THREAD_LIBS_INIT})
target_link_libraries(freenect-tiltdemo freenect_sync ${CMAKE_THREAD_LIBS_INIT} ${MATH_LIB})
target_link_libraries(freenect-regtest freenect_sync ${CMAKE_THREAD_LIBS_INIT})
endif()
endif()


install (TARGETS glview regview hiview
install (TARGETS freenect-glview freenect-regview freenect-hiview
DESTINATION bin)

if (BUILD_C_SYNC)
install (TARGETS glpclview tiltdemo
install (TARGETS freenect-glpclview freenect-tiltdemo
DESTINATION bin)
endif()

if (BUILD_AUDIO)
install (TARGETS wavrecord DESTINATION bin)
install (TARGETS micview DESTINATION bin)
install (TARGETS freenect-wavrecord DESTINATION bin)
install (TARGETS freenect-micview DESTINATION bin)
endif()
9 changes: 6 additions & 3 deletions fakenect/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ target_link_libraries(fakenect ${MATH_LIB})
install (TARGETS fakenect
DESTINATION "${PROJECT_LIBRARY_INSTALL_DIR}/fakenect")

add_executable(record record.c)
target_link_libraries(record freenect)
install (TARGETS record
add_executable(fakenect-record record.c)
target_link_libraries(fakenect-record freenect m)
install (TARGETS fakenect-record
DESTINATION bin)

CONFIGURE_FILE("fakenect.sh.in"
Expand All @@ -24,3 +24,6 @@ CONFIGURE_FILE("fakenect.sh.in"
install (PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/fakenect.sh
DESTINATION bin
RENAME fakenect)

install(FILES fakenect.1 fakenect-record.1
DESTINATION ${PROJECT_MANPAGE_INSTALL_DIR}/man1)
53 changes: 53 additions & 0 deletions fakenect/fakenect-record.1
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
.TH FAKENECT-RECORD 1 2012-01-29 "libfreenect" "libfreenect manual"
.SH NAME
fakenect-record - program to save dumps from kinect to file
.SH SYNOPSIS
.SY fakenect-record
.OP \-h
.OP \-ffmpeg
.OP \-ffmpeg-opts \fIoptions\fP
.I outputdir
.br
.SH DESCRIPTION
.LP
\fBfakenect-record\fP dumps the output of the kinect in \fIoutputdir\fP
folder. It saves the acceleration, depth, and rgb data as individual files
with names in the form "TYPE-CURRENTIME-TIMESTAMP" where:
.IP " *" 3
TYPE is either (a)ccel, (d)epth, or (r)gb
.IP " *" 3
TIMESTAMP corresponds to the timestamp associated with the observation (or
in the case of accel, the last timestamp seen)
.IP " *" 3
CURRENTTIME corresponds to a floating point version of the time in seconds.
.LP
The purpose of storing the current time is so that delays can
be recreated exactly as they occurred. For RGB and DEPTH the dump is just
the entirety of the data provided in PPM and PGM formats respectively (just
a 1 line header above the raw dump). For ACCEL, the dump is the
"freenect_raw_tilt_state". Only the front part of the file name is used,
with the rest left undefined (extension, extra info, etc).
.LP
A file called INDEX.txt is also output with all of the filenames local to
that directory to simplify the format (e.g., no need to read the directory
structure).
.LP
Once started, the program will continue to acquire data from the kinect.
When you want to stop it, hit Ctrl-C and the signal will be caught, runloop
stopped, and everything will be stored cleanly.
.SH OPTIONS
.TP
.B \-ffmpeg
If present, send the the video stream to ffmpeg
.
.TP
.B \-ffmpeg-opts \fIoptions\fP
When using ffmpeg, specify the options to be used with it. If unspecified,
it will use the options "\-aspect 4:3 \-r 20 \-vcodec msmpeg4 \-b 30000k"
.
.TP
.B \-h
Display the command-line help
.SH "SEE ALSO"
.BR fakenect (1)

18 changes: 18 additions & 0 deletions fakenect/fakenect.1
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
.TH FAKENECT 1 2012-01-29 "libfreenect" "libfreenect manual"
.SH NAME
fakenect - Run a program by faking the Kinect
.SH SYNOPSIS
.SY fakenect
.I database
.I application
.I args
.br
.SH DESCRIPTION
.LP
\fBfakenect\fP runs \fIapplication\fP with the arguments \fIargs\fP using
the data contained in the folder \fIdatabase\fP. These data should have been
recorded using \fIfakenect-record\fP(1).
.SH "SEE ALSO"
.BR fakenect-record (1)


8 changes: 4 additions & 4 deletions wrappers/cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,23 +14,23 @@ endif()

include_directories(.)

add_executable(cppview cppview.cpp)
add_executable(freenect-cppview cppview.cpp)

# Mac just has everything already
if(APPLE)
set(CMAKE_EXE_LINKER_FLAGS "-framework OpenGL -framework GLUT")
target_link_libraries(cppview freenect)
target_link_libraries(freenect-cppview freenect)
else()
find_package(Threads REQUIRED)
find_package(OpenGL REQUIRED)
find_package(GLUT REQUIRED)

include_directories(${OPENGL_INCLUDE_DIRS} ${GLUT_INCLUDE_DIRS} ${USB_INCLUDE_DIRS})

target_link_libraries(cppview freenect ${OPENGL_LIBRARIES} ${GLUT_LIBRARY} ${CMAKE_THREAD_LIBS_INIT} ${MATH_LIB})
target_link_libraries(freenect-cppview freenect ${OPENGL_LIBRARIES} ${GLUT_LIBRARY} ${CMAKE_THREAD_LIBS_INIT} ${MATH_LIB})
endif()

install (TARGETS cppview
install (TARGETS freenect-cppview
DESTINATION bin)

ENDIF()
6 changes: 3 additions & 3 deletions wrappers/opencv/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ install (TARGETS freenect_cv
install (FILES "libfreenect_cv.h"
DESTINATION ${PROJECT_INCLUDE_INSTALL_DIR})

add_executable(cvdemo cvdemo.c)
target_link_libraries(cvdemo freenect freenect_sync freenect_cv ${OpenCV_LIBS})
install (TARGETS cvdemo
add_executable(freenect-cvdemo cvdemo.c)
target_link_libraries(freenect-cvdemo freenect freenect_sync freenect_cv ${OpenCV_LIBS})
install (TARGETS freenect-cvdemo
DESTINATION bin)