Improve compatibility with new CMake macro

Signed-off-by: Igor Raits <ignatenkobrain@fedoraproject.org>
This commit is contained in:
Igor Raits 2020-07-08 11:30:14 +02:00
parent a4574bad7d
commit 4543f37e04
No known key found for this signature in database
GPG Key ID: 115D5AB89C5C1E1E

View File

@ -1,3 +1,5 @@
%undefine __cmake_in_source_build
Name: uchardet Name: uchardet
Version: 0.0.6 Version: 0.0.6
Release: 10%{?dist} Release: 10%{?dist}
@ -28,25 +30,20 @@ for developing tools for uchardet.
%prep %prep
%autosetup %autosetup
mkdir build
%build %build
pushd build %cmake \
%cmake .. \
-DCMAKE_INSTALL_LIBDIR=%{_libdir} \ -DCMAKE_INSTALL_LIBDIR=%{_libdir} \
-DBUILD_STATIC=OFF -DBUILD_STATIC=OFF
%make_build %cmake_build
popd
%install %install
pushd build %cmake_install
%make_install
popd
%ldconfig_scriptlets %ldconfig_scriptlets
%check %check
pushd build pushd %{_vpath_builddir}
ctest -VV \ ctest -VV \
%ifarch %{ix86} %ifarch %{ix86}
|| : || :