mirror of
https://github.com/bspeice/libcvautomation
synced 2025-04-21 00:41:29 -04:00
Fix build issues related to opencv2
This commit is contained in:
parent
86332f894b
commit
84383e2053
@ -30,19 +30,22 @@ AC_PATH_X
|
|||||||
|
|
||||||
#Configure OpenCV - version 2+ breaks a lot of things
|
#Configure OpenCV - version 2+ breaks a lot of things
|
||||||
PKG_CHECK_MODULES([OpenCV], [opencv >= 2.0.0], [use_opencv2=true], [use_opencv1=true])
|
PKG_CHECK_MODULES([OpenCV], [opencv >= 2.0.0], [use_opencv2=true], [use_opencv1=true])
|
||||||
|
AC_SUBST_FILE([cv_headers])
|
||||||
|
if test "$use_opencv2" == "true"; then
|
||||||
#Let doxygen know where our headers are at
|
#Let doxygen know where our headers are at
|
||||||
AC_SUBST(CV_VERSION, "opencv2")
|
AC_SUBST(CV_VERSION, "opencv2")
|
||||||
AC_SUBST_FILE([cv_headers])
|
|
||||||
cv_headers=$srcdir/include/opencv2_includes
|
cv_headers=$srcdir/include/opencv2_includes
|
||||||
if test "$use_opencv1" != ""; then
|
AC_SUBST(CV_CFLAGS, [`pkg-config --cflags opencv`])
|
||||||
|
AC_SUBST(CV_LIBS, ["-lopencv_core -lopencv_imgproc -lopencv_highgui"])
|
||||||
|
else
|
||||||
echo "could not find OpenCV version 2.0.0 or higher, checking for 1.0.0 or higher..."
|
echo "could not find OpenCV version 2.0.0 or higher, checking for 1.0.0 or higher..."
|
||||||
PKG_CHECK_MODULES([OpenCV], [opencv >= 1.0.0])
|
PKG_CHECK_MODULES([OpenCV], [opencv >= 1.0.0])
|
||||||
#Update doxygen on where our headers are at
|
#Update doxygen on where our headers are at
|
||||||
AC_SUBST(CV_VERSION, "opencv1")
|
AC_SUBST(CV_VERSION, "opencv1")
|
||||||
cv_headers=$srcdir/include/opencv1_includes
|
cv_headers=$srcdir/include/opencv1_includes
|
||||||
fi
|
|
||||||
AC_SUBST(CV_CFLAGS, [`pkg-config --cflags opencv`])
|
AC_SUBST(CV_CFLAGS, [`pkg-config --cflags opencv`])
|
||||||
AC_SUBST(CV_LIBS, [`pkg-config --libs opencv`])
|
AC_SUBST(CV_LIBS, [`pkg-config --libs opencv`])
|
||||||
|
fi
|
||||||
|
|
||||||
PKG_CHECK_MODULES([X11], [x11 >= 1.0.3])
|
PKG_CHECK_MODULES([X11], [x11 >= 1.0.3])
|
||||||
AC_SUBST(X11_CFLAGS, [`pkg-config --cflags x11`])
|
AC_SUBST(X11_CFLAGS, [`pkg-config --cflags x11`])
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
if BUILD_EXAMPLES
|
if BUILD_EXAMPLES
|
||||||
#Need to include the -Ilibcvautomation so that libcvautomation.h can find everything that it needs
|
#Need to include the -Ilibcvautomation so that libcvautomation.h can find everything that it needs
|
||||||
AM_LDFLAGS = -L../libcvautomation/.libs -lcvautomation `pkg-config --libs x11` `pkg-config --libs opencv` `pkg-config --libs xtst`
|
AM_LDFLAGS = -L../libcvautomation/.libs -lcvautomation @X11_LIBS@ @XTEST_LIBS@ @CV_LIBS@
|
||||||
AM_CFLAGS = -Wall -Werror -O2 -I$(top_srcdir)/include
|
AM_CFLAGS = -Wall -Werror -O2 -I$(top_srcdir)/include @X11_CFLAGS@ @XTEST_CFLAGS@ @CV_CFLAGS@
|
||||||
|
|
||||||
#Build only if we're building the examples
|
#Build only if we're building the examples
|
||||||
bin_PROGRAMS = cva-match cva-input
|
bin_PROGRAMS = cva-match cva-input
|
||||||
|
Loading…
Reference in New Issue
Block a user