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