Skip to content

Commit ddde702

Browse files
committed
Fix pkg-config generation with absolute install dirs
Analogous to KhronosGroup/SPIRV-Tools#6483 Signed-off-by: Marcin Serwin <[email protected]>
1 parent 8c1d6b6 commit ddde702

File tree

4 files changed

+8
-6
lines changed

4 files changed

+8
-6
lines changed

cmake/shaderc.pc.in

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
prefix=@CMAKE_INSTALL_PREFIX@
22
exec_prefix=${prefix}
3-
libdir=${prefix}/@CMAKE_INSTALL_LIBDIR@
4-
includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@
3+
libdir=@PKG_CONFIG_LIBDIR@
4+
includedir=@PKG_CONFIG_INCLUDEDIR@
55

66
Name: shaderc
77
Description: Tools and libraries for Vulkan shader compilation

cmake/shaderc_combined.pc.in

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
prefix=@CMAKE_INSTALL_PREFIX@
22
exec_prefix=${prefix}
3-
libdir=${prefix}/@CMAKE_INSTALL_LIBDIR@
4-
includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@
3+
libdir=@PKG_CONFIG_LIBDIR@
4+
includedir=@PKG_CONFIG_INCLUDEDIR@
55

66
Name: shaderc
77
Description: Tools and libraries for Vulkan shader compilation

cmake/shaderc_static.pc.in

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
prefix=@CMAKE_INSTALL_PREFIX@
22
exec_prefix=${prefix}
3-
libdir=${prefix}/@CMAKE_INSTALL_LIBDIR@
4-
includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@
3+
libdir=@PKG_CONFIG_LIBDIR@
4+
includedir=@PKG_CONFIG_INCLUDEDIR@
55

66
Name: shaderc
77
Description: Tools and libraries for Vulkan shader compilation

cmake/write_pkg_config.cmake

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,6 @@ REGEX
2828
# CMake support "-dev" in the version.
2929
# If it's not a "-dev" version then ensure it ends with ".1"
3030
string(REGEX REPLACE "-dev.1" ".0" CURRENT_VERSION "${CURRENT_VERSION}.1")
31+
cmake_path(APPEND PKG_CONFIG_LIBDIR "\${exec_prefix}" "${CMAKE_INSTALL_LIBDIR}")
32+
cmake_path(APPEND PKG_CONFIG_INCLUDEDIR "\${prefix}" "${CMAKE_INSTALL_INCLUDEDIR}")
3133
configure_file(${TEMPLATE_FILE} ${OUT_FILE} @ONLY)

0 commit comments

Comments
 (0)