Merge pull request #3205 from parafin:ximea_unix-3.0

This commit is contained in:
Vadim Pisarevsky 2014-09-14 18:44:41 +00:00
commit 8d61ecbc4d
3 changed files with 13 additions and 3 deletions

View File

@ -153,7 +153,7 @@ OCV_OPTION(WITH_V4L "Include Video 4 Linux support" ON
OCV_OPTION(WITH_LIBV4L "Use libv4l for Video 4 Linux support" ON IF (UNIX AND NOT ANDROID) )
OCV_OPTION(WITH_DSHOW "Build VideoIO with DirectShow support" ON IF (WIN32 AND NOT ARM) )
OCV_OPTION(WITH_MSMF "Build VideoIO with Media Foundation support" OFF IF WIN32 )
OCV_OPTION(WITH_XIMEA "Include XIMEA cameras support" OFF IF (NOT ANDROID AND NOT APPLE) )
OCV_OPTION(WITH_XIMEA "Include XIMEA cameras support" OFF IF (NOT ANDROID) )
OCV_OPTION(WITH_XINE "Include Xine support (GPL)" OFF IF (UNIX AND NOT APPLE AND NOT ANDROID) )
OCV_OPTION(WITH_CLP "Include Clp support (EPL)" OFF)
OCV_OPTION(WITH_OPENCL "Include OpenCL Runtime support" ON IF (NOT IOS) )

View File

@ -31,6 +31,12 @@ if(WIN32)
else()
set(XIMEA_FOUND 0)
endif()
elseif(APPLE)
if(EXISTS /Library/Frameworks/m3api.framework)
set(XIMEA_FOUND 1)
else()
set(XIMEA_FOUND 0)
endif()
else()
if(EXISTS /opt/XIMEA)
set(XIMEA_FOUND 1)

View File

@ -94,12 +94,16 @@ endif(HAVE_opencv_androidcamera)
if(HAVE_XIMEA)
list(APPEND videoio_srcs ${CMAKE_CURRENT_LIST_DIR}/src/cap_ximea.cpp)
ocv_include_directories(${XIMEA_PATH})
if(XIMEA_PATH)
ocv_include_directories(${XIMEA_PATH})
endif()
if(XIMEA_LIBRARY_DIR)
link_directories("${XIMEA_LIBRARY_DIR}")
endif()
if(X86_64)
if(WIN32 AND X86_64)
list(APPEND VIDEOIO_LIBRARIES m3apiX64)
elseif(APPLE)
list(APPEND VIDEOIO_LIBRARIES "-framework m3api")
else()
list(APPEND VIDEOIO_LIBRARIES m3api)
endif()