From 702a07e71602a1d81e888b46cbbcf8398b02454d Mon Sep 17 00:00:00 2001 From: Kyle Bentley Date: Fri, 23 Nov 2018 12:35:18 -0600 Subject: [PATCH] CMakeLists: Fix incorrect creation of pkg-config file (Contributed by Kyle Bentley) --- CMakeLists.txt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b459b78e4..91cc942df 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -12,6 +12,7 @@ # Revised by Vicky Pfau, 2018 # Revised by Cameron Cawley, 2018 # Revised by Cosmin Truta, 2018 +# Revised by Kyle Bentley, 2018 # This code is released under the libpng license. # For conditions of distribution and use, see the disclaimer @@ -822,8 +823,8 @@ endif() if(NOT WIN32 OR CYGWIN OR MINGW) set(prefix ${CMAKE_INSTALL_PREFIX}) set(exec_prefix ${CMAKE_INSTALL_PREFIX}) - set(libdir ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}) - set(includedir ${CMAKE_INSTALL_PREFIX}/include) + set(libdir ${CMAKE_INSTALL_FULL_LIBDIR}) + set(includedir ${CMAKE_INSTALL_FULL_INCLUDEDIR}) set(LIBS "-lz -lm") configure_file(${CMAKE_CURRENT_SOURCE_DIR}/libpng.pc.in ${CMAKE_CURRENT_BINARY_DIR}/${PNGLIB_NAME}.pc @ONLY)