Skip to content

Commit

Permalink
opencv wrapper: Use the CMake OpenCV finder instead of naming librari…
Browse files Browse the repository at this point in the history
…es explicitly.

Signed-off-by: Drew Fisher <[email protected]>
  • Loading branch information
zarvox committed Nov 14, 2011
1 parent e7eed98 commit 8755990
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions wrappers/opencv/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,21 +1,22 @@
######################################################################################
# OpenCV Interface
######################################################################################
find_package(OpenCV REQUIRED)
add_library (freenect_cv SHARED libfreenect_cv.c)
set_target_properties (freenect_cv PROPERTIES
VERSION ${PROJECT_VER}
SOVERSION ${PROJECT_APIVER})

include_directories (../c_sync)

target_link_libraries (freenect_cv freenect_sync cv)
target_link_libraries (freenect_cv freenect_sync ${OpenCV_LIBS})

install (TARGETS freenect_cv
DESTINATION "${PROJECT_LIBRARY_INSTALL_DIR}")
install (FILES "libfreenect_cv.h"
DESTINATION ${PROJECT_INCLUDE_INSTALL_DIR})

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

0 comments on commit 8755990

Please sign in to comment.