opencv: make build with opencv 2.3.1 as in debian sid
authorTim-Philipp Müller <tim.muller@collabora.co.uk>
Thu, 15 Mar 2012 00:05:41 +0000 (00:05 +0000)
committerTim-Philipp Müller <tim.muller@collabora.co.uk>
Thu, 15 Mar 2012 00:05:41 +0000 (00:05 +0000)
Where highgui.h doesn't exist any more, but only opencv2/highgui/highgui.hpp.
Also, not quite sure why we're checking for cvaux.h, it's not used anywhere.

configure.ac
ext/opencv/MotionCells.h
ext/opencv/gsttemplatematch.h

index 37d7859..3630a3a 100644 (file)
@@ -1432,16 +1432,12 @@ AG_GST_CHECK_FEATURE(OPENCV, [opencv plugins], opencv, [
     AC_LANG_CPLUSPLUS
     OLD_CPPFLAGS=$CPPFLAGS
     CPPFLAGS=$OPENCV_CFLAGS
-    AC_CHECK_HEADER(highgui.h, HAVE_HIGHGUI="yes", HAVE_HIGHGUI="no")
-    AC_CHECK_HEADER(cvaux.h, HAVE_CVAUX="yes", HAVE_CVAUX="no")
+    AC_CHECK_HEADERS(highgui.h opencv2/highgui/highgui.hpp, HAVE_HIGHGUI="yes", HAVE_HIGHGUI="no")
     CPPFLAGS=$OLD_CPPFLAGS
     AC_LANG_C
     if test "x$HAVE_HIGHGUI" = "xno"; then
       AC_MSG_RESULT(highgui.h could not be found.)
       HAVE_OPENCV="no"
-    elif test "x$HAVE_CVAUX" = "xno"; then
-      AC_MSG_RESULT(cvaux.h could not be found.)
-      HAVE_OPENCV="no"
     else
       HAVE_OPENCV="yes"
     fi
index ee84fd6..c5d4b17 100644 (file)
 #define MOTIONCELLS_H_
 
 #include <cv.h>                 // includes OpenCV definitions
+#ifndef __OPENCV_OLD_CV_H__
 #include <highgui.h>            // includes highGUI definitions
+#else
+#include <opencv2/highgui/highgui.hpp>            // includes highGUI definitions
+#endif
 #include <iostream>
 #include <fstream>
 #include <vector>
index 7b4b388..7e55ac6 100644 (file)
 
 #include <gst/gst.h>
 #include <cv.h>
-#include <highgui.h>
+#ifndef __OPENCV_OLD_CV_H__
+#include <highgui.h>            // includes highGUI definitions
+#else
+#include <opencv2/highgui/highgui.hpp>            // includes highGUI definitions
+#endif
 
 G_BEGIN_DECLS
 /* #defines don't like whitespacey bits */