From: Lasse Collin Date: Sun, 16 Jun 2024 15:33:08 +0000 (+0300) Subject: Revert "CMake: Set only "prefix" as an absolute path in liblzma.pc" X-Git-Tag: v5.7.1alpha~212 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7a366d93cfd74ce10201db400be8836199944e36;p=thirdparty%2Fxz.git Revert "CMake: Set only "prefix" as an absolute path in liblzma.pc" This reverts commit 5d1c649ba9eb7a5b9371252ebfbc2911dc774e69. While CMAKE_INSTALL_ tend to be relative paths, they don't need to be. Thus the commit was broken. A fancier method is required. Thanks to Eli Schwartz for the bug report and explanation. --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 210e71ce..5b0ebe3d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1415,9 +1415,9 @@ file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/liblzma-config.cmake" # Create liblzma.pc. set(prefix "${CMAKE_INSTALL_PREFIX}") -set(exec_prefix "\${prefix}") -set(libdir "\${exec_prefix}/${CMAKE_INSTALL_LIBDIR}") -set(includedir "\${prefix}/${CMAKE_INSTALL_INCLUDEDIR}") +set(exec_prefix "${CMAKE_INSTALL_PREFIX}") +set(libdir "${CMAKE_INSTALL_FULL_LIBDIR}") +set(includedir "${CMAKE_INSTALL_FULL_INCLUDEDIR}") set(PTHREAD_CFLAGS "${CMAKE_THREAD_LIBS_INIT}") configure_file(src/liblzma/liblzma.pc.in liblzma.pc @ONLY