spirv-tools: fix paths in pkg-config files

This commit is contained in:
Alexander Shpilkin 2022-05-09 07:48:49 +03:00 committed by Artturin
parent 1554ab553b
commit 2ddb885824

View file

@ -17,6 +17,21 @@ stdenv.mkDerivation rec {
cmakeFlags = [ "-DSPIRV-Headers_SOURCE_DIR=${spirv-headers.src}" ];
# https://github.com/KhronosGroup/SPIRV-Tools/issues/3905
postPatch = ''
substituteInPlace CMakeLists.txt \
--replace '-P ''${CMAKE_CURRENT_SOURCE_DIR}/cmake/write_pkg_config.cmake' \
'-DCMAKE_INSTALL_FULL_LIBDIR=''${CMAKE_INSTALL_FULL_LIBDIR}
-DCMAKE_INSTALL_FULL_INCLUDEDIR=''${CMAKE_INSTALL_FULL_INCLUDEDIR}
-P ''${CMAKE_CURRENT_SOURCE_DIR}/cmake/write_pkg_config.cmake'
substituteInPlace cmake/SPIRV-Tools.pc.in \
--replace '$'{prefix}/@CMAKE_INSTALL_LIBDIR@ @CMAKE_INSTALL_FULL_LIBDIR@ \
--replace '$'{prefix}/@CMAKE_INSTALL_INCLUDEDIR@ @CMAKE_INSTALL_FULL_INCLUDEDIR@
substituteInPlace cmake/SPIRV-Tools-shared.pc.in \
--replace '$'{prefix}/@CMAKE_INSTALL_LIBDIR@ @CMAKE_INSTALL_FULL_LIBDIR@ \
--replace '$'{prefix}/@CMAKE_INSTALL_INCLUDEDIR@ @CMAKE_INSTALL_FULL_INCLUDEDIR@
'';
meta = with lib; {
inherit (src.meta) homepage;
description = "The SPIR-V Tools project provides an API and commands for processing SPIR-V modules";