Skip to content

Commit

Permalink
treewide: replace prefix/libdir and prefix/includedir with full_lib/i…
Browse files Browse the repository at this point in the history
…ncludedir

Fixes pkg-config file when CMAKE_INSTALL_{INCLUDE,LIB}DIR is absolute, such as with Nix

See NixOS/nixpkgs#181875 for some context
  • Loading branch information
LunNova committed Jan 23, 2023
1 parent 44e921d commit 9346093
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 12 deletions.
8 changes: 4 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ endif()

# Codecs & icons paths
#
set(SAIL_CODECS_PATH "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/sail/codecs")
set(SAIL_CODECS_PATH "${CMAKE_INSTALL_FULL_LIBDIR}/sail/codecs")
if (WIN32)
string(REPLACE "/" "\\\\" SAIL_CODECS_PATH "${SAIL_CODECS_PATH}")
endif()
Expand Down Expand Up @@ -313,9 +313,9 @@ message("* For example, if you configure with -DBUILD_SHARED_LIBS=OFF -DSA
message("* the final value of SAIL_COMBINE_CODECS will be ON.")
message("*")
message("* Install prefix: ${CMAKE_INSTALL_PREFIX}")
message("* LIBDIR: ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}")
message("* INCLUDEDIR: ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_INCLUDEDIR}")
message("* DATADIR: ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATAROOTDIR}")
message("* LIBDIR: ${CMAKE_INSTALL_FULL_LIBDIR}")
message("* INCLUDEDIR: ${CMAKE_INSTALL_FULL_INCLUDEDIR}")
message("* DATADIR: ${CMAKE_INSTALL_FULL_DATAROOTDIR}")
message("*")
message("* Enabled codecs: ${ENABLED_CODECS}")
message("* Disabled codecs: ${DISABLED_CODECS}")
Expand Down
4 changes: 2 additions & 2 deletions src/bindings/c++/pkgconfig/libsail-c++.pc.in
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
prefix=@CMAKE_INSTALL_PREFIX@
exec_prefix=@CMAKE_INSTALL_PREFIX@
libdir=${exec_prefix}/@CMAKE_INSTALL_LIBDIR@
includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@/sail
libdir=${CMAKE_INSTALL_FULL_LIBDIR}@
includedir=${CMAKE_INSTALL_FULL_INCLUDEDIR}@

Name: libsail-c++
Description: SAIL C++ client library
Expand Down
4 changes: 2 additions & 2 deletions src/libsail-common/pkgconfig/libsail-common.pc.in
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
prefix=@CMAKE_INSTALL_PREFIX@
exec_prefix=@CMAKE_INSTALL_PREFIX@
libdir=${exec_prefix}/@CMAKE_INSTALL_LIBDIR@
includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@/sail
libdir=${CMAKE_INSTALL_FULL_LIBDIR}@
includedir=${CMAKE_INSTALL_FULL_INCLUDEDIR}@

Name: libsail-common
Description: SAIL common client library
Expand Down
4 changes: 2 additions & 2 deletions src/libsail-manip/pkgconfig/libsail-manip.pc.in
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
prefix=@CMAKE_INSTALL_PREFIX@
exec_prefix=@CMAKE_INSTALL_PREFIX@
libdir=${exec_prefix}/@CMAKE_INSTALL_LIBDIR@
includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@/sail
libdir=${CMAKE_INSTALL_FULL_LIBDIR}@
includedir=${CMAKE_INSTALL_FULL_INCLUDEDIR}@

Name: libsail-manip
Description: SAIL image manipulation library
Expand Down
4 changes: 2 additions & 2 deletions src/libsail/pkgconfig/libsail.pc.in
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
prefix=@CMAKE_INSTALL_PREFIX@
exec_prefix=@CMAKE_INSTALL_PREFIX@
libdir=${exec_prefix}/@CMAKE_INSTALL_LIBDIR@
includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@/sail
libdir=${CMAKE_INSTALL_FULL_LIBDIR}@
includedir=${CMAKE_INSTALL_FULL_INCLUDEDIR}@

Name: libsail
Description: SAIL client library
Expand Down

0 comments on commit 9346093

Please sign in to comment.