Cmake out of tree build fixes.

This commit is contained in:
Vitaly Zaitsev 2020-07-21 11:22:39 +02:00
parent 985a43aefc
commit efe22a0797
No known key found for this signature in database
GPG Key ID: BF99FC6DD45AB90A

View File

@ -1,3 +1,4 @@
%undefine __cmake_in_source_build
%bcond_without clang
%if %{with clang}
@ -44,11 +45,9 @@ Requires: %{name}%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release}
%prep
%autosetup -p1
mkdir -p %{_target_platform}
%build
pushd %{_target_platform}
%cmake -G Ninja \
%cmake -G Ninja \
%if %{with clang}
-DCMAKE_C_COMPILER=%{_bindir}/clang \
-DCMAKE_CXX_COMPILER=%{_bindir}/clang++ \
@ -72,13 +71,11 @@ pushd %{_target_platform}
-DUSE_BUNDLED_OPENSSL:BOOL=OFF \
-DUSE_BUNDLED_SODIUM:BOOL=OFF \
-DBUILD_LIB_TESTS:BOOL=OFF \
-DBUILD_LIB_EXAMPLES:BOOL=OFF \
..
popd
%ninja_build -C %{_target_platform}
-DBUILD_LIB_EXAMPLES:BOOL=OFF
%cmake_build
%install
%ninja_install -C %{_target_platform}
%cmake_install
ln -s libmatrix_client.so.%{version} %{buildroot}%{_libdir}/libmatrix_client.so.0
%files