diff --git a/fix-cmake-install.patch b/fix-cmake-install.patch new file mode 100644 index 0000000..abc912e --- /dev/null +++ b/fix-cmake-install.patch @@ -0,0 +1,12 @@ +diff -up SPIRV-Tools-3e4abc9ac382b6fc7a88316a700652404b6fb9f7/CMakeLists.txt.dma SPIRV-Tools-3e4abc9ac382b6fc7a88316a700652404b6fb9f7/CMakeLists.txt +--- SPIRV-Tools-3e4abc9ac382b6fc7a88316a700652404b6fb9f7/CMakeLists.txt.dma 2019-11-12 13:58:34.347573658 +1000 ++++ SPIRV-Tools-3e4abc9ac382b6fc7a88316a700652404b6fb9f7/CMakeLists.txt 2019-11-12 13:58:47.166919110 +1000 +@@ -215,7 +215,7 @@ if(ENABLE_SPIRV_TOOLS_INSTALL) + endmacro() + else() + macro(spvtools_config_package_dir TARGET PATH) +- set(${PATH} lib/cmake/${TARGET}) ++ set(${PATH} ${CMAKE_INSTALL_LIBDIR}/cmake/${TARGET}) + endmacro() + endif() + diff --git a/spirv-tools.spec b/spirv-tools.spec index 156dab1..63ff029 100644 --- a/spirv-tools.spec +++ b/spirv-tools.spec @@ -12,6 +12,8 @@ License: ASL 2.0 URL: https://github.com/KhronosGroup/SPIRV-Tools Source0: %url/archive/%{commit}.tar.gz#/%{name}-%{commit}.tar.gz +Patch0: fix-cmake-install.patch + BuildRequires: cmake3 BuildRequires: gcc-c++ BuildRequires: ninja-build @@ -59,7 +61,6 @@ popd %install %ninja_install -C %_target_platform -rm -rf %{buildroot}/usr/lib/cmake %ldconfig_scriptlets libs %files @@ -83,6 +84,7 @@ rm -rf %{buildroot}/usr/lib/cmake %files devel %{_includedir}/spirv-tools/ +%{_libdir}/cmake/* %{_libdir}/pkgconfig/SPIRV-Tools-shared.pc %{_libdir}/pkgconfig/SPIRV-Tools.pc