Skip to content

Commit

Permalink
pkg-config: fix double prefixed libdir= and includedir=
Browse files Browse the repository at this point in the history
According to [1], CMAKE_INSTALL_<DIR> variables are allowed to be either
relative or absolute. This means one should never prefix to them, in
case they are already absolute. Use CMAKE_INSTALL_FULL_<DIR> instead, to
not end up with double prefix when the build system uses absolute paths.

This patch fixes broken rdma-core *.pc files in
https://github.com/nixos/nixpkgs.

[1] https://cmake.org/cmake/help/latest/module/GNUInstallDirs.html

Signed-off-by: Bjørn Forsman <bjorn.forsman@gmail.com>
  • Loading branch information
bjornfor committed Mar 11, 2022
1 parent ae6eb0a commit 4389aed
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions buildlib/template.pc.in
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
prefix=@CMAKE_INSTALL_PREFIX@
exec_prefix=${prefix}
libdir=${prefix}/@CMAKE_INSTALL_LIBDIR@
includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@
libdir=@CMAKE_INSTALL_FULL_LIBDIR@
includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@

Name: lib@PC_LIB_NAME@
Description: RDMA Core Userspace Library
Expand Down

0 comments on commit 4389aed

Please sign in to comment.