Commit c23c2cc8 authored by Vincent Hourdin's avatar Vincent Hourdin

Compiling with OpenCV 4.

parent 58198f77
......@@ -105,8 +105,11 @@ if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
PKG_CHECK_MODULES([OPENCV], [opencv >= 3.0],
[OPENCV_LIBS="-lopencv_core -lopencv_imgproc -lopencv_calib3d"],
[PKG_CHECK_MODULES([OPENCV], [opencv >= 2.0],
[OPENCV_LIBS="-lopencv_core -lopencv_imgproc"],
AC_MSG_ERROR([opencv not found. Not using some image processing.]))]
[OPENCV_LIBS="-lopencv_core -lopencv_imgproc"],
[PKG_CHECK_MODULES([OPENCV], [opencv4],
[OPENCV_LIBS="-lopencv_core -lopencv_imgproc -lopencv_calib3d"],
AC_MSG_ERROR([opencv not found. Not using some image processing.]))]
)]
)
else
AC_MSG_ERROR([no C++ compiler found])
......
......@@ -2,7 +2,7 @@
bin_PROGRAMS = siril
AM_CPPFLAGS = -DPACKAGE_DATA_DIR='"$(datadir)/${PACKAGE}"' -DPACKAGE_DOC_DIR='"${datarootdir}/doc/${PACKAGE}"' -DLOCALEDIR='"${localedir}"' $(FFMPEG_CFLAGS) $(GTK_CFLAGS) ${GTK_MAC_CFLAGS} $(LIBTIFF_CFLAGS) $(LIBPNG_CFLAGS) $(FFTW_CFLAGS) $(CFITSIO_CFLAGS) $(GSL_CFLAGS) $(FFMS2_CFLAGS) $(LIBCONFIG_CFLAGS) -I $(top_builddir)/deps/kplot
AM_CPPFLAGS = -DPACKAGE_DATA_DIR='"$(datadir)/${PACKAGE}"' -DPACKAGE_DOC_DIR='"${datarootdir}/doc/${PACKAGE}"' -DLOCALEDIR='"${localedir}"' ${OPENCV_CFLAGS} $(FFMPEG_CFLAGS) $(GTK_CFLAGS) ${GTK_MAC_CFLAGS} $(LIBTIFF_CFLAGS) $(LIBPNG_CFLAGS) $(FFTW_CFLAGS) $(CFITSIO_CFLAGS) $(GSL_CFLAGS) $(FFMS2_CFLAGS) $(LIBCONFIG_CFLAGS) -I $(top_builddir)/deps/kplot
siril_SOURCES = \
main.c \
......
......@@ -32,6 +32,9 @@
#if CV_MAJOR_VERSION == 2
#include "opencv/findHomography/calib3d.hpp"
#else
#if CV_MAJOR_VERSION == 4
#define CV_RANSAC FM_RANSAC
#endif
#include <opencv2/calib3d.hpp>
#endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment