|
|
|
@ -27,50 +27,41 @@ if(WITH_GSTREAMER AND NOT WITH_GSTREAMER_0_10) |
|
|
|
|
ENDIF(GSTREAMER_gstbase_LIBRARY AND GSTREAMER_gstvideo_LIBRARY AND GSTREAMER_gstapp_LIBRARY AND GSTREAMER_gstpbutils_LIBRARY AND GSTREAMER_gstriff_LIBRARY) |
|
|
|
|
|
|
|
|
|
else(WIN32) |
|
|
|
|
CHECK_MODULE(gstreamer-base-1.0 HAVE_GSTREAMER_BASE VIDEOIO) |
|
|
|
|
CHECK_MODULE(gstreamer-video-1.0 HAVE_GSTREAMER_VIDEO VIDEOIO) |
|
|
|
|
CHECK_MODULE(gstreamer-app-1.0 HAVE_GSTREAMER_APP VIDEOIO) |
|
|
|
|
CHECK_MODULE(gstreamer-riff-1.0 HAVE_GSTREAMER_RIFF VIDEOIO) |
|
|
|
|
CHECK_MODULE(gstreamer-pbutils-1.0 HAVE_GSTREAMER_PBUTILS VIDEOIO) |
|
|
|
|
|
|
|
|
|
if(HAVE_GSTREAMER_BASE AND HAVE_GSTREAMER_VIDEO AND HAVE_GSTREAMER_APP AND HAVE_GSTREAMER_RIFF AND HAVE_GSTREAMER_PBUTILS) |
|
|
|
|
ocv_check_modules(GSTREAMER-1.0 gstreamer-base-1.0 gstreamer-video-1.0 gstreamer-app-1.0 gstreamer-riff-1.0 gstreamer-pbutils-1.0) |
|
|
|
|
if(HAVE_GSTREAMER-1.0) |
|
|
|
|
set(HAVE_GSTREAMER TRUE) |
|
|
|
|
set(GSTREAMER_BASE_VERSION ${ALIASOF_gstreamer-base-1.0_VERSION}) |
|
|
|
|
set(GSTREAMER_VIDEO_VERSION ${ALIASOF_gstreamer-video-1.0_VERSION}) |
|
|
|
|
set(GSTREAMER_APP_VERSION ${ALIASOF_gstreamer-app-1.0_VERSION}) |
|
|
|
|
set(GSTREAMER_RIFF_VERSION ${ALIASOF_gstreamer-riff-1.0_VERSION}) |
|
|
|
|
set(GSTREAMER_PBUTILS_VERSION ${ALIASOF_gstreamer-pbutils-1.0_VERSION}) |
|
|
|
|
ocv_append_build_options(VIDEOIO GSTREAMER-1.0) |
|
|
|
|
set(GSTREAMER_BASE_VERSION ${GSTREAMER-1.0_gstreamer-base-1.0_VERSION}) |
|
|
|
|
set(GSTREAMER_VIDEO_VERSION ${GSTREAMER-1.0_gstreamer-video-1.0_VERSION}) |
|
|
|
|
set(GSTREAMER_APP_VERSION ${GSTREAMER-1.0_gstreamer-app-1.0_VERSION}) |
|
|
|
|
set(GSTREAMER_RIFF_VERSION ${GSTREAMER-1.0_gstreamer-riff-1.0_VERSION}) |
|
|
|
|
set(GSTREAMER_PBUTILS_VERSION ${GSTREAMER-1.0_gstreamer-pbutils-1.0_VERSION}) |
|
|
|
|
endif() |
|
|
|
|
endif(WIN32) |
|
|
|
|
endif(WITH_GSTREAMER AND NOT WITH_GSTREAMER_0_10) |
|
|
|
|
endif() |
|
|
|
|
|
|
|
|
|
# if gstreamer 1.x was not found, or we specified we wanted 0.10, try to find it |
|
|
|
|
if(WITH_GSTREAMER AND NOT HAVE_GSTREAMER OR WITH_GSTREAMER_0_10) |
|
|
|
|
CHECK_MODULE(gstreamer-base-0.10 HAVE_GSTREAMER_BASE VIDEOIO) |
|
|
|
|
CHECK_MODULE(gstreamer-video-0.10 HAVE_GSTREAMER_VIDEO VIDEOIO) |
|
|
|
|
CHECK_MODULE(gstreamer-app-0.10 HAVE_GSTREAMER_APP VIDEOIO) |
|
|
|
|
CHECK_MODULE(gstreamer-riff-0.10 HAVE_GSTREAMER_RIFF VIDEOIO) |
|
|
|
|
CHECK_MODULE(gstreamer-pbutils-0.10 HAVE_GSTREAMER_PBUTILS VIDEOIO) |
|
|
|
|
|
|
|
|
|
if(HAVE_GSTREAMER_BASE AND HAVE_GSTREAMER_VIDEO AND HAVE_GSTREAMER_APP AND HAVE_GSTREAMER_RIFF AND HAVE_GSTREAMER_PBUTILS) |
|
|
|
|
ocv_check_modules(GSTREAMER-0.10 gstreamer-base-0.10 gstreamer-video-0.10 gstreamer-app-0.10 gstreamer-riff-0.10 gstreamer-pbutils-0.10) |
|
|
|
|
if(HAVE_GSTREAMER-0.10) |
|
|
|
|
set(HAVE_GSTREAMER TRUE) |
|
|
|
|
set(GSTREAMER_BASE_VERSION ${ALIASOF_gstreamer-base-0.10_VERSION}) |
|
|
|
|
set(GSTREAMER_VIDEO_VERSION ${ALIASOF_gstreamer-video-0.10_VERSION}) |
|
|
|
|
set(GSTREAMER_APP_VERSION ${ALIASOF_gstreamer-app-0.10_VERSION}) |
|
|
|
|
set(GSTREAMER_RIFF_VERSION ${ALIASOF_gstreamer-riff-0.10_VERSION}) |
|
|
|
|
set(GSTREAMER_PBUTILS_VERSION ${ALIASOF_gstreamer-pbutils-0.10_VERSION}) |
|
|
|
|
ocv_append_build_options(VIDEOIO GSTREAMER-0.10) |
|
|
|
|
set(GSTREAMER_BASE_VERSION ${GSTREAMER-0.10_gstreamer-base-0.10_VERSION}) |
|
|
|
|
set(GSTREAMER_VIDEO_VERSION ${GSTREAMER-0.10_gstreamer-video-0.10_VERSION}) |
|
|
|
|
set(GSTREAMER_APP_VERSION ${GSTREAMER-0.10_gstreamer-app-0.10_VERSION}) |
|
|
|
|
set(GSTREAMER_RIFF_VERSION ${GSTREAMER-0.10_gstreamer-riff-0.10_VERSION}) |
|
|
|
|
set(GSTREAMER_PBUTILS_VERSION ${GSTREAMER-0.10_gstreamer-pbutils-0.10_VERSION}) |
|
|
|
|
endif() |
|
|
|
|
endif() |
|
|
|
|
endif(WITH_GSTREAMER AND NOT HAVE_GSTREAMER OR WITH_GSTREAMER_0_10) |
|
|
|
|
|
|
|
|
|
# --- unicap --- |
|
|
|
|
ocv_clear_vars(HAVE_UNICAP) |
|
|
|
|
if(WITH_UNICAP) |
|
|
|
|
CHECK_MODULE(libunicap HAVE_UNICAP_ VIDEOIO) |
|
|
|
|
CHECK_MODULE(libucil HAVE_UNICAP_UCIL VIDEOIO) |
|
|
|
|
if(HAVE_UNICAP_ AND HAVE_UNICAP_UCIL) |
|
|
|
|
set(HAVE_UNICAP TRUE) |
|
|
|
|
ocv_check_modules(HAVE_UNICAP libunicap libucil) |
|
|
|
|
if(HAVE_UNICAP) |
|
|
|
|
ocv_append_build_options(VIDEOIO UNICAP) |
|
|
|
|
endif() |
|
|
|
|
endif() |
|
|
|
|
endif(WITH_UNICAP) |
|
|
|
|
|
|
|
|
|
# --- PvApi --- |
|
|
|
|
ocv_clear_vars(HAVE_PVAPI) |
|
|
|
@ -120,7 +111,7 @@ endif(WITH_GIGEAPI) |
|
|
|
|
# --- Aravis SDK --- |
|
|
|
|
ocv_clear_vars(HAVE_ARAVIS_API) |
|
|
|
|
if(WITH_ARAVIS) |
|
|
|
|
check_module(glib-2.0 HAVE_ARAVIS_GLIB VIDEOIO) |
|
|
|
|
ocv_check_modules(ARAVIS_GLIB glib-2.0) |
|
|
|
|
if(HAVE_ARAVIS_GLIB) |
|
|
|
|
find_path(ARAVIS_INCLUDE_PATH "arv.h" |
|
|
|
|
PATHS /usr/local /var /opt /usr ENV ProgramFiles ENV ProgramW6432 |
|
|
|
@ -128,6 +119,7 @@ if(WITH_ARAVIS) |
|
|
|
|
DOC "The path to Aravis SDK headers") |
|
|
|
|
find_library(ARAVIS_LIBRARIES NAMES "aravis-0.6" "aravis-0.4" ) |
|
|
|
|
if(ARAVIS_LIBRARIES AND ARAVIS_INCLUDE_PATH) |
|
|
|
|
ocv_append_build_options(VIDEOIO ARAVIS_GLIB) |
|
|
|
|
set(HAVE_ARAVIS_API TRUE) |
|
|
|
|
endif() |
|
|
|
|
else() |
|
|
|
@ -139,6 +131,7 @@ endif(WITH_ARAVIS) |
|
|
|
|
ocv_clear_vars(HAVE_DC1394 HAVE_DC1394_2) |
|
|
|
|
if(WITH_1394) |
|
|
|
|
if(WIN32 AND MINGW) |
|
|
|
|
# TODO remove this, use pkgconfig from MinGW instead |
|
|
|
|
find_path(CMU1394_INCLUDE_PATH "/1394common.h" |
|
|
|
|
PATH_SUFFIXES include |
|
|
|
|
DOC "The path to cmu1394 headers") |
|
|
|
@ -153,36 +146,42 @@ if(WITH_1394) |
|
|
|
|
endif() |
|
|
|
|
endif() |
|
|
|
|
if(HAVE_DC1394_2) |
|
|
|
|
ocv_parse_pkg("libdc1394-2" "${DC1394_2_LIB_DIR}/pkgconfig" "") |
|
|
|
|
ocv_parse_pkg(DC1394_2_VERSION "libdc1394-2" "${DC1394_2_LIB_DIR}/pkgconfig") |
|
|
|
|
ocv_include_directories(${DC1394_2_INCLUDE_PATH}) |
|
|
|
|
set(VIDEOIO_LIBRARIES ${VIDEOIO_LIBRARIES} |
|
|
|
|
"${DC1394_2_LIB_DIR}/libdc1394.a" |
|
|
|
|
"${CMU1394_LIB_DIR}/lib1394camera.a") |
|
|
|
|
endif(HAVE_DC1394_2) |
|
|
|
|
else(WIN32 AND MINGW) |
|
|
|
|
CHECK_MODULE(libdc1394-2 HAVE_DC1394_2 VIDEOIO) |
|
|
|
|
endif() |
|
|
|
|
endif() |
|
|
|
|
if(NOT HAVE_DC1394_2) |
|
|
|
|
CHECK_MODULE(libdc1394 HAVE_DC1394 VIDEOIO) |
|
|
|
|
ocv_check_modules(DC1394_2 libdc1394-2) |
|
|
|
|
if(HAVE_DC1394_2) |
|
|
|
|
ocv_append_build_options(VIDEOIO DC1394_2) |
|
|
|
|
else() |
|
|
|
|
ocv_check_modules(DC1394 libdc1394) |
|
|
|
|
if(HAVE_DC1394) |
|
|
|
|
ocv_append_build_options(VIDEOIO DC1394) |
|
|
|
|
endif() |
|
|
|
|
endif() |
|
|
|
|
endif() |
|
|
|
|
endif() |
|
|
|
|
endif(WIN32 AND MINGW) |
|
|
|
|
endif(WITH_1394) |
|
|
|
|
|
|
|
|
|
# --- xine --- |
|
|
|
|
ocv_clear_vars(HAVE_XINE) |
|
|
|
|
if(WITH_XINE) |
|
|
|
|
CHECK_MODULE(libxine HAVE_XINE VIDEOIO) |
|
|
|
|
ocv_check_modules(XINE libxine) |
|
|
|
|
if(HAVE_XINE) |
|
|
|
|
ocv_append_build_options(VIDEOIO XINE) |
|
|
|
|
endif() |
|
|
|
|
endif(WITH_XINE) |
|
|
|
|
|
|
|
|
|
# --- V4L --- |
|
|
|
|
ocv_clear_vars(HAVE_LIBV4L HAVE_CAMV4L HAVE_CAMV4L2 HAVE_VIDEOIO) |
|
|
|
|
if(WITH_V4L) |
|
|
|
|
if(WITH_LIBV4L) |
|
|
|
|
CHECK_MODULE(libv4l1 HAVE_LIBV4L1 VIDEOIO) |
|
|
|
|
CHECK_MODULE(libv4l2 HAVE_LIBV4L2 VIDEOIO) |
|
|
|
|
if(HAVE_LIBV4L1 AND HAVE_LIBV4L2) |
|
|
|
|
set(HAVE_LIBV4L YES) |
|
|
|
|
else() |
|
|
|
|
set(HAVE_LIBV4L NO) |
|
|
|
|
ocv_check_modules(LIBV4L libv4l1 libv4l2) |
|
|
|
|
if(HAVE_LIBV4L) |
|
|
|
|
ocv_append_build_options(VIDEOIO LIBV4L) |
|
|
|
|
endif() |
|
|
|
|
endif() |
|
|
|
|
CHECK_INCLUDE_FILE(linux/videodev.h HAVE_CAMV4L) |
|
|
|
@ -323,8 +322,11 @@ endif() |
|
|
|
|
# --- gPhoto2 --- |
|
|
|
|
ocv_clear_vars(HAVE_GPHOTO2) |
|
|
|
|
if(WITH_GPHOTO2) |
|
|
|
|
CHECK_MODULE(libgphoto2 HAVE_GPHOTO2 VIDEOIO) |
|
|
|
|
endif(WITH_GPHOTO2) |
|
|
|
|
ocv_check_modules(GPHOTO2 libgphoto2) |
|
|
|
|
if(HAVE_GPHOTO2) |
|
|
|
|
ocv_append_build_options(VIDEOIO GPHOTO2) |
|
|
|
|
endif() |
|
|
|
|
endif() |
|
|
|
|
|
|
|
|
|
# --- VA & VA_INTEL --- |
|
|
|
|
if(WITH_VA_INTEL) |
|
|
|
|