From 5d1c649ba9eb7a5b9371252ebfbc2911dc774e69 Mon Sep 17 00:00:00 2001 From: Lasse Collin Date: Wed, 5 Jun 2024 12:59:59 +0300 Subject: [PATCH] CMake: Set only "prefix" as an absolute path in liblzma.pc CMake provides variables that are relative to CMAKE_INSTALL_PREFIX so use them instead of repeating the full path. --- CMakeLists.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index f18161d9..a6321672 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1394,9 +1394,9 @@ file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/liblzma-config.cmake" # Create liblzma.pc. set(prefix "${CMAKE_INSTALL_PREFIX}") -set(exec_prefix "${CMAKE_INSTALL_PREFIX}") -set(libdir "${CMAKE_INSTALL_FULL_LIBDIR}") -set(includedir "${CMAKE_INSTALL_FULL_INCLUDEDIR}") +set(exec_prefix "\${prefix}") +set(libdir "\${exec_prefix}/${CMAKE_INSTALL_LIBDIR}") +set(includedir "\${prefix}/${CMAKE_INSTALL_INCLUDEDIR}") set(PTHREAD_CFLAGS "${CMAKE_THREAD_LIBS_INIT}") configure_file(src/liblzma/liblzma.pc.in liblzma.pc @ONLY