mirror of
https://github.com/bspeice/libcvautomation
synced 2024-12-04 13:58:11 -05:00
Fix up the brutish hack into something that looks much better
This commit is contained in:
parent
c4c700fcda
commit
86332f894b
13
configure.ac
13
configure.ac
@ -32,21 +32,14 @@ AC_PATH_X
|
||||
PKG_CHECK_MODULES([OpenCV], [opencv >= 2.0.0], [use_opencv2=true], [use_opencv1=true])
|
||||
#Let doxygen know where our headers are at
|
||||
AC_SUBST(CV_VERSION, "opencv2")
|
||||
AC_SUBST(CV_HEADERS_1, ["/* OpenCV2 includes - some filenames are different"])
|
||||
AC_SUBST(CV_HEADERS_2, [" * from the OpenCV1 counterparts */"])
|
||||
AC_SUBST(CV_HEADERS_3, ["include <opencv2/core/core_c.h>"])
|
||||
AC_SUBST(CV_HEADERS_4, ["include <opencv2/highgui/highgui_c.h>"])
|
||||
AC_SUBST(CV_HEADERS_5, ["include <opencv2/imgproc/imgproc_c.h>"])
|
||||
AC_SUBST_FILE([cv_headers])
|
||||
cv_headers=$srcdir/include/opencv2_includes
|
||||
if test "$use_opencv1" != ""; then
|
||||
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])
|
||||
#Update doxygen on where our headers are at
|
||||
AC_SUBST(CV_VERSION, "opencv1")
|
||||
AC_SUBST(CV_HEADERS_1, ["/* OpenCV includes */"])
|
||||
AC_SUBST(CV_HEADERS_2, [" " ])
|
||||
AC_SUBST(CV_HEADERS_3, ["include <opencv/cv.h>"])
|
||||
AC_SUBST(CV_HEADERS_4, ["include <opencv/highgui.h>"])
|
||||
AC_SUBST(CV_HEADERS_5, ["define NEVER_USED"])
|
||||
cv_headers=$srcdir/include/opencv1_includes
|
||||
fi
|
||||
AC_SUBST(CV_CFLAGS, [`pkg-config --cflags opencv`])
|
||||
AC_SUBST(CV_LIBS, [`pkg-config --libs opencv`])
|
||||
|
@ -25,11 +25,7 @@
|
||||
#include <string.h>
|
||||
|
||||
/* Autoconf logic to select the correct OpenCV version */
|
||||
@CV_HEADERS_1@
|
||||
@CV_HEADERS_2@
|
||||
#@CV_HEADERS_3@
|
||||
#@CV_HEADERS_4@
|
||||
#@CV_HEADERS_5@
|
||||
@cv_headers@
|
||||
|
||||
/* X11 includes */
|
||||
#include <X11/Xlib.h>
|
||||
|
4
include/opencv1_includes
Normal file
4
include/opencv1_includes
Normal file
@ -0,0 +1,4 @@
|
||||
/* OpenCV includes */
|
||||
|
||||
#include <opencv/cv.h>
|
||||
#include <opencv/highgui.h>
|
5
include/opencv2_includes
Normal file
5
include/opencv2_includes
Normal file
@ -0,0 +1,5 @@
|
||||
/* OpenCV2 includes - some filenames are different
|
||||
* from the OpenCV1 counterparts */
|
||||
#include <opencv2/core/core_c.h>
|
||||
#include <opencv2/highgui/highgui_c.h>
|
||||
#include <opencv2/imgproc/imgproc_c.h>
|
Loading…
Reference in New Issue
Block a user