Fix includes for opencv2

epel9
Nicolas Chauvet 5 years ago committed by kwizart
parent ed49812c44
commit e8eab8a9ac

@ -0,0 +1,24 @@
diff -up opencv-4.1.2/cmake/templates/OpenCVConfig.cmake.in.orig opencv-4.1.2/cmake/templates/OpenCVConfig.cmake.in
--- opencv-4.1.2/cmake/templates/OpenCVConfig.cmake.in.orig 2019-10-10 00:53:14.000000000 +0200
+++ opencv-4.1.2/cmake/templates/OpenCVConfig.cmake.in 2019-10-17 11:08:46.626400320 +0200
@@ -106,7 +106,7 @@ set(OpenCV_SHARED @BUILD_SHARED_LIBS@)
set(OpenCV_USE_MANGLED_PATHS @OpenCV_USE_MANGLED_PATHS_CONFIGCMAKE@)
set(OpenCV_LIB_COMPONENTS @OPENCV_MODULES_CONFIGCMAKE@)
-set(__OpenCV_INCLUDE_DIRS @OpenCV_INCLUDE_DIRS_CONFIGCMAKE@)
+set(__OpenCV_INCLUDE_DIRS @OpenCV_INCLUDE_DIRS_CONFIGCMAKE@ @OpenCV_INCLUDE_DIRS_CONFIGCMAKE@/opencv2)
set(OpenCV_INCLUDE_DIRS "")
foreach(d ${__OpenCV_INCLUDE_DIRS})
diff -up opencv-4.1.2/cmake/templates/opencv-XXX.pc.in.orig opencv-4.1.2/cmake/templates/opencv-XXX.pc.in
--- opencv-4.1.2/cmake/templates/opencv-XXX.pc.in.orig 2019-10-10 00:53:14.000000000 +0200
+++ opencv-4.1.2/cmake/templates/opencv-XXX.pc.in 2019-10-17 11:04:11.486014573 +0200
@@ -3,7 +3,7 @@
prefix=@prefix@
exec_prefix=@exec_prefix@
libdir=@libdir@
-includedir_old=@includedir@/opencv
+includedir_old=@includedir@/opencv2
includedir_new=@includedir@
Name: OpenCV

@ -75,6 +75,7 @@ Source1: %{name}_contrib-clean-%{version}.tar.gz
Source3: face_landmark_model.dat.xz Source3: face_landmark_model.dat.xz
Patch0: opencv-4.1.0-install_3rdparty_licenses.patch Patch0: opencv-4.1.0-install_3rdparty_licenses.patch
Patch1: opencv-4.1.2-includes.patch
BuildRequires: gcc-c++ BuildRequires: gcc-c++
BuildRequires: libtool BuildRequires: libtool
@ -247,6 +248,7 @@ mkdir 3rdparty/
mv quirc/ 3rdparty/ mv quirc/ 3rdparty/
%patch0 -p1 -b .install_3rdparty_licenses %patch0 -p1 -b .install_3rdparty_licenses
%patch1 -p1 -b .inc2
pushd %{name}_contrib-%{version} pushd %{name}_contrib-%{version}
popd popd

Loading…
Cancel
Save