mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-10-06 02:32:23 +00:00
opencv: define CV_NO_BACKWARD_COMPATIBILITY to suppress warnings caused by compat header
Compile with -DCV_NO_BACKWARD_COMPATIBILITY for now, so that the compat header doesn't get included, which causes compiler warnings that (it seems) can't be switched off easily. As a result, we also specify a max. version in configure, so the build doesn't break if our code doesn't compile against newer opencv versions any more with that flag.
This commit is contained in:
parent
41b9b76fa5
commit
960ccc118f
2 changed files with 9 additions and 2 deletions
|
@ -1226,7 +1226,13 @@ AG_GST_CHECK_FEATURE(OFA, [ofa plugins], ofa, [
|
||||||
dnl *** opencv ***
|
dnl *** opencv ***
|
||||||
translit(dnm, m, l) AM_CONDITIONAL(USE_OPENCV, true)
|
translit(dnm, m, l) AM_CONDITIONAL(USE_OPENCV, true)
|
||||||
AG_GST_CHECK_FEATURE(OPENCV, [opencv plugins], opencv, [
|
AG_GST_CHECK_FEATURE(OPENCV, [opencv plugins], opencv, [
|
||||||
PKG_CHECK_MODULES(OPENCV, opencv >= 2.0.0 libswscale >= 0.7 , [
|
dnl we specify a max. version too because we set CV_NO_BACKWARD_COMPATIBILITY
|
||||||
|
dnl and don't want the build to break when a new opencv version comes out.
|
||||||
|
dnl Need to adjust this upwards once we know that our code compiles fine with
|
||||||
|
dnl a new version and the no-backward-compatibility define. (There doesn't
|
||||||
|
dnl seem to be a switch to suppress the warnings the cvcompat.h header
|
||||||
|
dnl causes.)
|
||||||
|
PKG_CHECK_MODULES(OPENCV, opencv >= 2.0.0 opencv <= 2.1.0 libswscale >= 0.7 , [
|
||||||
AC_PROG_CXX
|
AC_PROG_CXX
|
||||||
AC_LANG_CPLUSPLUS
|
AC_LANG_CPLUSPLUS
|
||||||
OLD_CPPFLAGS=$CPPFLAGS
|
OLD_CPPFLAGS=$CPPFLAGS
|
||||||
|
|
|
@ -24,7 +24,8 @@ libgstopencv_la_SOURCES = gstopencv.c \
|
||||||
# override CV_INLINE: GLib will take care of defining 'inline' sufficiently and
|
# override CV_INLINE: GLib will take care of defining 'inline' sufficiently and
|
||||||
# OpenCV's define isn't good enough to avoid 'unused' gcc warnings (at v2.1.0)
|
# OpenCV's define isn't good enough to avoid 'unused' gcc warnings (at v2.1.0)
|
||||||
libgstopencv_la_CFLAGS = $(GST_CFLAGS) $(GST_BASE_CFLAGS) $(OPENCV_CFLAGS) \
|
libgstopencv_la_CFLAGS = $(GST_CFLAGS) $(GST_BASE_CFLAGS) $(OPENCV_CFLAGS) \
|
||||||
$(GST_PLUGINS_BASE_CFLAGS) -DCV_INLINE="static inline"
|
$(GST_PLUGINS_BASE_CFLAGS) -DCV_INLINE="static inline" \
|
||||||
|
-DCV_NO_BACKWARD_COMPATIBILITY
|
||||||
|
|
||||||
libgstopencv_la_LIBADD = $(GST_LIBS) $(GST_BASE_LIBS) $(OPENCV_LIBS) \
|
libgstopencv_la_LIBADD = $(GST_LIBS) $(GST_BASE_LIBS) $(OPENCV_LIBS) \
|
||||||
$(GSTPB_BASE_LIBS) -lgstvideo-$(GST_MAJORMINOR)
|
$(GSTPB_BASE_LIBS) -lgstvideo-$(GST_MAJORMINOR)
|
||||||
|
|
Loading…
Reference in a new issue