From dbd78ed18eb5e95af0deb1f2949c448f8e864e1b Mon Sep 17 00:00:00 2001 From: Luna Nova Date: Mon, 23 Jan 2023 08:24:16 -0800 Subject: [PATCH] treewide: replace prefix/libdir and prefix/includedir with full_lib/includedir Fixes pkg-config file when CMAKE_INSTALL_{INCLUDE,LIB}DIR is absolute, such as with Nix See https://github.com/NixOS/nixpkgs/pull/181875 for some context --- CMakeLists.txt | 8 ++++---- src/bindings/c++/pkgconfig/libsail-c++.pc.in | 4 ++-- src/libsail-common/pkgconfig/libsail-common.pc.in | 4 ++-- src/libsail-manip/pkgconfig/libsail-manip.pc.in | 4 ++-- src/libsail/pkgconfig/libsail.pc.in | 4 ++-- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e573ade67..1d858df0b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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() @@ -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}") diff --git a/src/bindings/c++/pkgconfig/libsail-c++.pc.in b/src/bindings/c++/pkgconfig/libsail-c++.pc.in index efbd3b180..010694924 100644 --- a/src/bindings/c++/pkgconfig/libsail-c++.pc.in +++ b/src/bindings/c++/pkgconfig/libsail-c++.pc.in @@ -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@/sail Name: libsail-c++ Description: SAIL C++ client library diff --git a/src/libsail-common/pkgconfig/libsail-common.pc.in b/src/libsail-common/pkgconfig/libsail-common.pc.in index 0461bf0b6..634ae9d2e 100644 --- a/src/libsail-common/pkgconfig/libsail-common.pc.in +++ b/src/libsail-common/pkgconfig/libsail-common.pc.in @@ -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@/sail Name: libsail-common Description: SAIL common client library diff --git a/src/libsail-manip/pkgconfig/libsail-manip.pc.in b/src/libsail-manip/pkgconfig/libsail-manip.pc.in index 582947b71..340ec9938 100644 --- a/src/libsail-manip/pkgconfig/libsail-manip.pc.in +++ b/src/libsail-manip/pkgconfig/libsail-manip.pc.in @@ -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@/sail Name: libsail-manip Description: SAIL image manipulation library diff --git a/src/libsail/pkgconfig/libsail.pc.in b/src/libsail/pkgconfig/libsail.pc.in index 3978e089a..a25a8f062 100644 --- a/src/libsail/pkgconfig/libsail.pc.in +++ b/src/libsail/pkgconfig/libsail.pc.in @@ -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@/sail Name: libsail Description: SAIL client library