Cmake out of tree build fixes.

This commit is contained in:
Vitaly Zaitsev 2020-07-21 11:26:09 +02:00
parent b491c234e6
commit f78817145d
No known key found for this signature in database
GPG Key ID: BF99FC6DD45AB90A
1 changed files with 5 additions and 8 deletions

View File

@ -1,3 +1,4 @@
%undefine __cmake_in_source_build
%bcond_without clang
%if %{with clang}
@ -63,11 +64,9 @@ for Matrix that feels more like a mainstream chat app.
%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++ \
@ -94,13 +93,11 @@ pushd %{_target_platform}
-DUSE_BUNDLED_TWEENY:BOOL=OFF \
-DUSE_BUNDLED_JSON:BOOL=OFF \
-DUSE_BUNDLED_OPENSSL:BOOL=OFF \
-DUSE_BUNDLED_SODIUM:BOOL=OFF \
..
popd
%ninja_build -C %{_target_platform}
-DUSE_BUNDLED_SODIUM:BOOL=OFF
%cmake_build
%install
%ninja_install -C %{_target_platform}
%cmake_install
%check
appstream-util validate-relax --nonet %{buildroot}%{_metainfodir}/%{name}.appdata.xml