Improve compatibility with new CMake macro

Signed-off-by: Igor Raits <ignatenkobrain@fedoraproject.org>
This commit is contained in:
Igor Raits 2020-07-08 16:57:00 +02:00
parent 2867eeb143
commit 8a213bd8e7
No known key found for this signature in database
GPG Key ID: 115D5AB89C5C1E1E

View File

@ -1,3 +1,5 @@
%undefine __cmake_in_source_build
%global commit 67f4838659f475d618c120e13d1a196d7e00ba4b
%global shortcommit %(c=%{commit}; echo ${c:0:7})
%global commit_date 20200421
@ -46,18 +48,15 @@ Development files for %{name}
%autosetup -p1 -n SPIRV-Tools-%{commit}
%build
%__mkdir_p %_target_platform
pushd %_target_platform
%cmake3 -DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_LIBDIR=%{_lib} \
-DSPIRV-Headers_SOURCE_DIR=%{_prefix} \
-DPYTHON_EXECUTABLE=%{__python3} \
-GNinja ..
%ninja_build
popd
-GNinja
%cmake3_build
%install
%ninja_install -C %_target_platform
%cmake3_install
%ldconfig_scriptlets libs