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
|
%build
|
||||||
rm -rf build_shared && mkdir build_shared
|
%cmake -B build_shared \
|
||||||
rm -rf build_static && mkdir build_static
|
-DYAML_CPP_BUILD_TOOLS=OFF \
|
||||||
|
|
||||||
pushd build_shared
|
|
||||||
%cmake -DYAML_CPP_BUILD_TOOLS=OFF \
|
|
||||||
-DYAML_BUILD_SHARED_LIBS=ON \
|
-DYAML_BUILD_SHARED_LIBS=ON \
|
||||||
-DYAML_CPP_BUILD_TESTS=OFF \
|
-DYAML_CPP_BUILD_TESTS=OFF \
|
||||||
../
|
%{nil}
|
||||||
%make_build
|
%make_build -C build_shared
|
||||||
popd
|
|
||||||
|
|
||||||
pushd build_static
|
%cmake -B build_static \
|
||||||
%cmake -DYAML_CPP_BUILD_TOOLS=OFF \
|
-DYAML_CPP_BUILD_TOOLS=OFF \
|
||||||
-DYAML_BUILD_SHARED_LIBS=OFF \
|
-DYAML_BUILD_SHARED_LIBS=OFF \
|
||||||
-DYAML_CPP_BUILD_TESTS=OFF \
|
-DYAML_CPP_BUILD_TESTS=OFF \
|
||||||
../
|
%{nil}
|
||||||
%make_build
|
%make_build -C build_static
|
||||||
|
|
||||||
|
|
||||||
%install
|
%install
|
||||||
pushd build_static
|
%make_install -C build_static yaml-cpp
|
||||||
%make_install yaml-cpp
|
|
||||||
popd
|
|
||||||
|
|
||||||
# Move files so they don't get trampled
|
# Move files so they don't get trampled
|
||||||
mv %{buildroot}%{_libdir}/cmake/%{name} \
|
mv %{buildroot}%{_libdir}/cmake/%{name} \
|
||||||
@ -72,8 +66,7 @@ mv %{buildroot}%{_libdir}/pkgconfig/%{name}.pc \
|
|||||||
%{buildroot}%{_libdir}/pkgconfig/%{name}-static.pc
|
%{buildroot}%{_libdir}/pkgconfig/%{name}-static.pc
|
||||||
|
|
||||||
|
|
||||||
pushd build_shared
|
%make_install -C build_shared
|
||||||
%make_install
|
|
||||||
|
|
||||||
%ldconfig_scriptlets
|
%ldconfig_scriptlets
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user