forked from zarvox/libfreenect
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Moved cppview example to cpp wrapper
Moved compilation of cppview into cpp wrapper CMake Signed-off-by: Kyle Machulis <[email protected]>
- Loading branch information
Showing
3 changed files
with
37 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,38 @@ | ||
INSTALL(FILES libfreenect.hpp | ||
DESTINATION include) | ||
DESTINATION include) | ||
|
||
set(CMAKE_C_FLAGS "-Wall") | ||
|
||
if (WIN32) | ||
set(THREADS_USE_PTHREADS_WIN32 true) | ||
find_package(Threads REQUIRED) | ||
|
||
include_directories(${THREADS_PTHREADS_INCLUDE_DIR}) | ||
endif() | ||
|
||
include_directories(.) | ||
|
||
add_executable(cppview cppview.cpp) | ||
|
||
# Mac just has everything already | ||
if(APPLE) | ||
set(CMAKE_EXE_LINKER_FLAGS "-framework OpenGL -framework GLUT") | ||
target_link_libraries(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}) | ||
|
||
if (WIN32) | ||
set(MATH_LIB "") | ||
else(WIN32) | ||
set(MATH_LIB "m") | ||
endif() | ||
|
||
target_link_libraries(cppview freenect ${OPENGL_LIBRARIES} ${GLUT_LIBRARY} ${CMAKE_THREAD_LIBS_INIT} ${MATH_LIB}) | ||
endif() | ||
|
||
install (TARGETS cppview | ||
DESTINATION bin) |
File renamed without changes.