From b027a84fa1398a0d5e681bd18cb74fa344cfe56e Mon Sep 17 00:00:00 2001 From: Igor Kuzmin Date: Tue, 9 Sep 2014 19:15:03 +0400 Subject: [PATCH 1/2] XIMEA cam support: use correct library for 64 bit Linux --- modules/highgui/CMakeLists.txt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/modules/highgui/CMakeLists.txt b/modules/highgui/CMakeLists.txt index 7d2547bcff..a0221c1e50 100644 --- a/modules/highgui/CMakeLists.txt +++ b/modules/highgui/CMakeLists.txt @@ -165,11 +165,13 @@ endif(HAVE_opencv_androidcamera) if(HAVE_XIMEA) list(APPEND highgui_srcs 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 HIGHGUI_LIBRARIES m3apiX64) else() list(APPEND HIGHGUI_LIBRARIES m3api) From 0421da78b32825496a01fc92a110060a9596a37f Mon Sep 17 00:00:00 2001 From: Igor Kuzmin Date: Tue, 9 Sep 2014 19:17:13 +0400 Subject: [PATCH 2/2] XIMEA cam support: allow on OS X too --- CMakeLists.txt | 2 +- cmake/OpenCVFindXimea.cmake | 6 ++++++ modules/highgui/CMakeLists.txt | 2 ++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6d55825397..4847869b9e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -159,7 +159,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 HighGUI with DirectShow support" ON IF (WIN32 AND NOT ARM) ) OCV_OPTION(WITH_MSMF "Build HighGUI 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_OPENCL "Include OpenCL Runtime support" ON IF (NOT IOS) ) OCV_OPTION(WITH_OPENCLAMDFFT "Include AMD OpenCL FFT library support" ON IF (NOT ANDROID AND NOT IOS) ) diff --git a/cmake/OpenCVFindXimea.cmake b/cmake/OpenCVFindXimea.cmake index 5f85a13dd0..2d93292c19 100644 --- a/cmake/OpenCVFindXimea.cmake +++ b/cmake/OpenCVFindXimea.cmake @@ -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) diff --git a/modules/highgui/CMakeLists.txt b/modules/highgui/CMakeLists.txt index a0221c1e50..b9908cbadf 100644 --- a/modules/highgui/CMakeLists.txt +++ b/modules/highgui/CMakeLists.txt @@ -173,6 +173,8 @@ if(HAVE_XIMEA) endif() if(WIN32 AND X86_64) list(APPEND HIGHGUI_LIBRARIES m3apiX64) + elseif(APPLE) + list(APPEND HIGHGUI_LIBRARIES "-framework m3api") else() list(APPEND HIGHGUI_LIBRARIES m3api) endif()