--- /dev/null
+--- OpenCV-2.3.1/OpenCVFindXimea.cmake.orig 2011-09-12 20:45:38.000000000 +0200
++++ OpenCV-2.3.1/OpenCVFindXimea.cmake 2012-02-01 19:18:07.619900166 +0100
+@@ -14,15 +14,13 @@
+ set(XIMEA_PATH)
+ set(XIMEA_LIBRARY_DIR)
+
+-# Try to find the XIMEA API path in registry.
+-GET_FILENAME_COMPONENT(XIMEA_PATH "[HKEY_CURRENT_USER\\Software\\XIMEA\\CamSupport\\API;Path]" ABSOLUTE)
++find_file(XIMEA_INC "m3Api.h" PATHS $ENV{XIMEA_INCLUDE} "/usr/include/ximea")
++find_library(XIMEA_LIB "m3api" PATHS $ENV{XIMEA_LIB} "/usr/lib${LIB_SUFFIX}")
+
+-if(XIMEA_PATH)
++if(XIMEA_INC AND XIMEA_LIB)
++ get_filename_component(XIMEA_LIBRARY_DIR "${XIMEA_LIB}" PATH CACHE)
++ get_filename_component(XIMEA_PATH "${XIMEA_INC}" PATH CACHE)
+ set(XIMEA_FOUND 1)
+-
+- # set LIB folders
+- set(XIMEA_LIBRARY_DIR "${XIMEA_PATH}\\x86")
+-
+ else()
+ set(XIMEA_FOUND 0)
+ endif()
+--- OpenCV-2.3.1/modules/highgui/src/cap_ximea.cpp.orig 2011-09-12 20:41:29.000000000 +0200
++++ OpenCV-2.3.1/modules/highgui/src/cap_ximea.cpp 2012-02-01 20:12:54.750010230 +0100
+@@ -1,4 +1,4 @@
+-
++#include <cstdio>
+ #include "precomp.hpp"
+
+ #include "xiApi.h"
+@@ -245,9 +245,7 @@
+
+ void CvCaptureCAM_XIMEA::errMsg(char* msg, int errNum)
+ {
+- char buf[512];
+- sprintf( buf, "%s : %d\n", msg, errNum);
+- OutputDebugString(buf);
++ fprintf(stderr, "%s : %d\n", msg, errNum);
+ }
+
+-/**********************************************************************************/
+\ No newline
++/**********************************************************************************/
#
# TODO:
# - CUDA support (on bcond)
-# - XIMEA? cmake file seems to be Win32-specific, but ximea.com has some Linux package
#
# Conditional build:
+# - general options:
+%bcond_with tbb # Threading Building Blocks support (everywhere)
+%bcond_with sse # use SSE instructions
+%bcond_with sse2 # use SSE2 instructions
+# - highgui options:
%bcond_without gstreamer # GStreamer support in highgui
%bcond_with openni # OpenNI (Natural Interaction) support in highgui
-%bcond_with pvapi # PvAPI (AVT GigE cameras) support in highgui
+%bcond_with pvapi # PvAPI (AVT GigE cameras) support in highgui (proprietary)
%bcond_with qt # Qt backend instead of GTK+ in highgui
-%bcond_with tbb # Threading Building Blocks support (everywhere)
%bcond_with unicap # Unicap support in highgui (GPL)
-%bcond_with v4l # Video4Linux (even V4L2 support currently relies on V4L1 API)
+%bcond_with v4l # Video4Linux in highgui (even V4L2 support currently relies on V4L1 API)
+%bcond_with ximea # m3API (XIMEA cameras) support in highgui (proprietary)
%bcond_with xine # XINE support in highgui (GPL)
-%bcond_with sse # use SSE instructions
-%bcond_with sse2 # use SSE2 instructions
#
%ifarch pentium3 pentium4 %{x8664}
%define with_sse 1
Patch3: %{name}-c.patch
Patch4: %{name}-gcc.patch
Patch5: %{name}-multilib.patch
+Patch6: %{name}-ximea-linux.patch
URL: http://opencv.willowgarage.com/
%{?with_pvapi:BuildRequires: AVT_GigE_SDK-devel}
BuildRequires: OpenEXR-devel
# as of OpenCV 2.3.1 there is also check for OpenNI-sensor-PrimeSense, but the result is not used
%{?with_openni:BuildRequires: OpenNI-devel}
+%{?with_ximea:BuildRequires: XIMEA-devel}
BuildRequires: cmake >= 2.4
BuildRequires: doxygen
BuildRequires: eigen >= 2
%patch3 -p1
%patch4 -p1
%patch5 -p1
+%patch6 -p1
%build
install -d build
%{?with_tbb:-DWITH_TBB=ON} \
%{?with_unicap:-DWITH_UNICAP=ON} \
%{!?with_v4l:-DWITH_V4L=OFF} \
+ %{?with_ximea:-DWITH_XIMEA=ON} \
%{?with_xine:-DWITH_XINE=ON}
%{__make}