Fix cmake build

epel9
Sérgio M. Basto 4 years ago
parent 9e86c663f2
commit fb2c54e4ff

@ -278,11 +278,9 @@ install -pm 0644 %{SOURCE4} .cache/ade/
# enabled by default if libraries are presents at build time: # enabled by default if libraries are presents at build time:
# GTK, GSTREAMER, 1394, V4L, eigen3 # GTK, GSTREAMER, 1394, V4L, eigen3
# non available on Fedora: FFMPEG, XINE # non available on Fedora: FFMPEG, XINE
mkdir -p build
pushd build
# disabling IPP because it is closed source library from intel # disabling IPP because it is closed source library from intel
%cmake CMAKE_VERBOSE=1 \ %cmake \
-DCV_TRACE=OFF \ -DCV_TRACE=OFF \
-DWITH_IPP=OFF \ -DWITH_IPP=OFF \
-DWITH_ITT=OFF \ -DWITH_ITT=OFF \
@ -326,7 +324,7 @@ pushd build
%{?with_opencl: -DOPENCL_INCLUDE_DIR=%{_includedir}/CL } \ %{?with_opencl: -DOPENCL_INCLUDE_DIR=%{_includedir}/CL } \
%{!?with_opencl: -DWITH_OPENCL=OFF } \ %{!?with_opencl: -DWITH_OPENCL=OFF } \
-DOPENCV_SKIP_PYTHON_LOADER=ON \ -DOPENCV_SKIP_PYTHON_LOADER=ON \
-DOPENCV_EXTRA_MODULES_PATH=../opencv_contrib-%{version}/modules \ -DOPENCV_EXTRA_MODULES_PATH=opencv_contrib-%{version}/modules \
-DWITH_LIBV4L=ON \ -DWITH_LIBV4L=ON \
-DWITH_OPENMP=ON \ -DWITH_OPENMP=ON \
-DOPENCV_CONFIG_INSTALL_PATH=%{_lib}/cmake/OpenCV \ -DOPENCV_CONFIG_INSTALL_PATH=%{_lib}/cmake/OpenCV \
@ -337,16 +335,13 @@ pushd build
%{?with_clp: -DWITH_CLP=ON } \ %{?with_clp: -DWITH_CLP=ON } \
%{?with_va: -DWITH_VA=ON } \ %{?with_va: -DWITH_VA=ON } \
%{!?with_vtk: -DWITH_VTK=OFF} \ %{!?with_vtk: -DWITH_VTK=OFF} \
%{?with_vulkan: -DWITH_VULKAN=ON -DVULKAN_INCLUDE_DIRS=%{_includedir}/vulkan } \ %{?with_vulkan: -DWITH_VULKAN=ON -DVULKAN_INCLUDE_DIRS=%{_includedir}/vulkan }
..
%cmake_build %cmake_build
popd
%install %install
%make_install -C build %cmake_install
rm -rf %{buildroot}%{_datadir}/OpenCV/licenses/ rm -rf %{buildroot}%{_datadir}/OpenCV/licenses/
%if %{with java} %if %{with java}

Loading…
Cancel
Save