Skip to content

Commit

Permalink
cmake: use CMAKE_INSTALL_FULL_* in the pc file
Browse files Browse the repository at this point in the history
This makes possible to use absolute paths in `CMAKE_INSTALL_LIBDIR`.
The current situation can causes troubles in some environment notably
nixpkgs/NixOS. See https://github.com/jtojnar/cmake-snips?tab=readme-ov-file#assuming-cmake_install_dir-is-relative-path
for more details.
  • Loading branch information
LeSuisse committed Jun 15, 2024
1 parent c4c95e3 commit a38ef27
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cmake/pc.in
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
prefix=@CMAKE_INSTALL_PREFIX@
exec_prefix=${prefix}
includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@/@PROJECT_NAME@
libdir=${exec_prefix}/@CMAKE_INSTALL_LIBDIR@
exec_prefix=@CMAKE_INSTALL_FULL_LIBEXECDIR@
includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@/@PROJECT_NAME@
libdir=@CMAKE_INSTALL_FULL_LIBDIR@

Name: @PROJECT_NAME@
Description: Simple C library offering ini file parsing services
Expand Down

0 comments on commit a38ef27

Please sign in to comment.