Improve compatibility with new CMake macro

Signed-off-by: Igor Raits <ignatenkobrain@fedoraproject.org>
This commit is contained in:
ignatenkobrain 2020-07-06 09:42:45 +02:00
commit 799ae01ed1
No known key found for this signature in database
GPG key ID: 115D5AB89C5C1E1E

View file

@ -1,3 +1,4 @@
%undefine __cmake_in_source_build
# This package only contains header files.
%global debug_package %{nil}
@ -48,21 +49,16 @@ This project currently only contains header files, which can be found in the
%patch0 -p1 -b .gtest
%patch1 -p1 -b .noarch
#%%patch10 -p1
mkdir build
%build
pushd build
%cmake3 \
-DUTF8_TESTS=ON \
-DUTF8_SAMPLES=ON \
..
%make_build
popd
%{nil}
%cmake3_build
%install
pushd build
%make_install
popd
%cmake3_install
pushd %{buildroot}%{_includedir}
ln -s utf8cpp/utf8.h ./
mkdir utf8
@ -72,9 +68,7 @@ done
popd
%check
pushd build
%make_build test
popd
%ctest
%files devel
%doc README.md samples/docsample.cpp