mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-30 04:00:37 +00:00
opencv: Fix OpenCV data path check to work with cross compilation
https://bugzilla.gnome.org/show_bug.cgi?id=753651
This commit is contained in:
parent
09b4f050e0
commit
0cc2156572
1 changed files with 12 additions and 3 deletions
15
configure.ac
15
configure.ac
|
@ -33,6 +33,9 @@ m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])],
|
|||
[AM_DEFAULT_VERBOSITY=1
|
||||
AC_SUBST(AM_DEFAULT_VERBOSITY)])
|
||||
|
||||
dnl PKG_CONFIG_SYSROOT_DIR is a valid environment variable
|
||||
m4_pattern_allow(PKG_CONFIG_SYSROOT_DIR)
|
||||
|
||||
dnl our libraries and install dirs use GST_API_VERSION in the filename
|
||||
dnl to allow side-by-side installation of different API versions
|
||||
GST_API_VERSION=1.0
|
||||
|
@ -2486,9 +2489,15 @@ AG_GST_CHECK_FEATURE(OPENCV, [opencv plugins], opencv, [
|
|||
AC_SUBST(OPENCV_PREFIX)
|
||||
AC_SUBST(OPENCV_CFLAGS)
|
||||
AC_SUBST(OPENCV_LIBS)
|
||||
AC_CHECK_FILE([$OPENCV_PREFIX/share/opencv/],
|
||||
[AC_DEFINE_UNQUOTED(OPENCV_PATH_NAME, ["opencv"], [OpenCV path name])],
|
||||
[AC_DEFINE_UNQUOTED(OPENCV_PATH_NAME, ["OpenCV"], [OpenCV path name])])
|
||||
dnl the OpenCV prefix is used at runtime for some object properties, and also
|
||||
dnl used here to detect which directory is the correct one. For the second
|
||||
dnl case, make sure the right sysroot is used, ensuring correct behavior
|
||||
dnl during cross compilation.
|
||||
if test -d "$PKG_CONFIG_SYSROOT_DIR/$OPENCV_PREFIX/share/opencv/"; then
|
||||
AC_DEFINE_UNQUOTED(OPENCV_PATH_NAME, ["opencv"], [OpenCV path name])
|
||||
else
|
||||
AC_DEFINE_UNQUOTED(OPENCV_PATH_NAME, ["OpenCV"], [OpenCV path name])
|
||||
fi
|
||||
])
|
||||
|
||||
dnl *** OpenEXR ***
|
||||
|
|
Loading…
Reference in a new issue