Skip to content

Commit 8755990

Browse files
committed
opencv wrapper: Use the CMake OpenCV finder instead of naming libraries explicitly.
Signed-off-by: Drew Fisher <[email protected]>
1 parent e7eed98 commit 8755990

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

wrappers/opencv/CMakeLists.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,22 @@
11
######################################################################################
22
# OpenCV Interface
33
######################################################################################
4+
find_package(OpenCV REQUIRED)
45
add_library (freenect_cv SHARED libfreenect_cv.c)
56
set_target_properties (freenect_cv PROPERTIES
67
VERSION ${PROJECT_VER}
78
SOVERSION ${PROJECT_APIVER})
89

910
include_directories (../c_sync)
1011

11-
target_link_libraries (freenect_cv freenect_sync cv)
12+
target_link_libraries (freenect_cv freenect_sync ${OpenCV_LIBS})
1213

1314
install (TARGETS freenect_cv
1415
DESTINATION "${PROJECT_LIBRARY_INSTALL_DIR}")
1516
install (FILES "libfreenect_cv.h"
1617
DESTINATION ${PROJECT_INCLUDE_INSTALL_DIR})
1718

1819
add_executable(cvdemo cvdemo.c)
19-
target_link_libraries(cvdemo freenect freenect_sync freenect_cv cv cxcore highgui)
20+
target_link_libraries(cvdemo freenect freenect_sync freenect_cv ${OpenCV_LIBS})
2021
install (TARGETS cvdemo
2122
DESTINATION bin)

0 commit comments

Comments
 (0)