Improve compatibility with new CMake macro
Signed-off-by: Igor Raits <ignatenkobrain@fedoraproject.org>
This commit is contained in:
parent
fd76ebf327
commit
7a624944f0
@ -41,29 +41,23 @@ The %{name}-static package contains the static library for %{name}.
|
||||
|
||||
|
||||
%build
|
||||
rm -rf build_shared && mkdir build_shared
|
||||
rm -rf build_static && mkdir build_static
|
||||
|
||||
pushd build_shared
|
||||
%cmake -DYAML_CPP_BUILD_TOOLS=OFF \
|
||||
%cmake -B build_shared \
|
||||
-DYAML_CPP_BUILD_TOOLS=OFF \
|
||||
-DYAML_BUILD_SHARED_LIBS=ON \
|
||||
-DYAML_CPP_BUILD_TESTS=OFF \
|
||||
../
|
||||
%make_build
|
||||
popd
|
||||
%{nil}
|
||||
%make_build -C build_shared
|
||||
|
||||
pushd build_static
|
||||
%cmake -DYAML_CPP_BUILD_TOOLS=OFF \
|
||||
%cmake -B build_static \
|
||||
-DYAML_CPP_BUILD_TOOLS=OFF \
|
||||
-DYAML_BUILD_SHARED_LIBS=OFF \
|
||||
-DYAML_CPP_BUILD_TESTS=OFF \
|
||||
../
|
||||
%make_build
|
||||
%{nil}
|
||||
%make_build -C build_static
|
||||
|
||||
|
||||
%install
|
||||
pushd build_static
|
||||
%make_install yaml-cpp
|
||||
popd
|
||||
%make_install -C build_static yaml-cpp
|
||||
|
||||
# Move files so they don't get trampled
|
||||
mv %{buildroot}%{_libdir}/cmake/%{name} \
|
||||
@ -72,8 +66,7 @@ mv %{buildroot}%{_libdir}/pkgconfig/%{name}.pc \
|
||||
%{buildroot}%{_libdir}/pkgconfig/%{name}-static.pc
|
||||
|
||||
|
||||
pushd build_shared
|
||||
%make_install
|
||||
%make_install -C build_shared
|
||||
|
||||
%ldconfig_scriptlets
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user