From 717b37dafc3d03c7e091bbc0cc53cdba340ebcd7 Mon Sep 17 00:00:00 2001 From: Vitaly Zaitsev Date: Jul 21 2020 09:58:04 +0000 Subject: Cmake out of tree build fixes. --- diff --git a/tdlib.spec b/tdlib.spec index b494a14..71da08f 100644 --- a/tdlib.spec +++ b/tdlib.spec @@ -1,3 +1,5 @@ +%undefine __cmake_in_source_build + # Build conditionals (with - OFF, without - ON)... %bcond_with clang %bcond_with ipo @@ -64,11 +66,9 @@ Requires: %{name}-devel%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release} %prep %autosetup -n td-%{version} -p1 -mkdir -p %{_target_platform} %build -pushd %{_target_platform} - %cmake -G Ninja \ +%cmake -G Ninja \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_INSTALL_LIBDIR=%{_lib} \ %if %{with clang} @@ -90,13 +90,11 @@ pushd %{_target_platform} -DTD_ENABLE_LTO:BOOL=OFF \ %endif -DTD_ENABLE_JNI:BOOL=OFF \ - -DTD_ENABLE_DOTNET:BOOL=OFF \ - .. -popd -%ninja_build -C %{_target_platform} + -DTD_ENABLE_DOTNET:BOOL=OFF +%cmake_build %install -%ninja_install -C %{_target_platform} +%cmake_install %files %license LICENSE_1_0.txt