Fixed building with and without documentation.

This commit is contained in:
Vitaly Zaitsev 2020-07-28 13:58:46 +02:00
parent c2a14c55f0
commit bce712ad56
No known key found for this signature in database
GPG Key ID: BF99FC6DD45AB90A

View File

@ -77,6 +77,11 @@ This package contains documentation for developer documentation for %{name}.
%prep
%autosetup -p1
%if %{with doc}
# Remove --clean-css since that plugin isn't available
sed -i "s/'--clean-css',//" doc/build.py
%endif
%build
%if 0%{?rhel} && 0%{?rhel} <= 7
%cmake3 \
@ -89,10 +94,13 @@ This package contains documentation for developer documentation for %{name}.
-DFMT_CMAKE_DIR=%{_datadir}/cmake/%{name} \
-DFMT_LIB_DIR=%{_libdir}
%cmake_build \
%if %{with doc}
--target doc \
%endif
--target all
%if %{with doc}
# Remove --clean-css since that plugin isn't available
sed -i "s/'--clean-css',//" doc/build.py
%cmake_build --target all --target doc
# Remove temporary build products
rm -rf %{_vpath_builddir}/doc/html/{.buildinfo,.doctrees,objects.inv}
%endif