From 2858cfe82e3a89ad828c5ee64ce868f870a90ef4 Mon Sep 17 00:00:00 2001 From: Dmitry Kalinkin Date: Sun, 10 Dec 2023 00:21:53 -0500 Subject: [PATCH 1/2] CMakeLists.txt: use CMAKE_INSTALL_FULL_* to support absolute paths in CMAKE_INSTALL_* CMAKE_INSTALL_* variables may be set to absolute paths, hence concatenating with CMAKE_INSTALL_PREFIX is not always valid. https://cmake.org/cmake/help/latest/module/GNUInstallDirs.html --- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e161810..9eec629 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -45,8 +45,8 @@ message(STATUS "APFEL: APFEL_DOWNLOAD_PDFS=${APFEL_DOWNLOAD_PDFS}") # CONFIG SCRIPT ======================================================== set(prefix ${CMAKE_INSTALL_PREFIX}) set(exec_prefix "${prefix}") -set(includedir "${prefix}/${CMAKE_INSTALL_INCLUDEDIR}") -set(libdir "${prefix}/${CMAKE_INSTALL_LIBDIR}") +set(includedir "${CMAKE_INSTALL_FULL_INCLUDEDIR}") +set(libdir "${CMAKE_INSTALL_FULL_LIBDIR}") set(PACKAGE_VERSION "${apfel_VERSION}") configure_file("${PROJECT_SOURCE_DIR}/bin/apfel-config.in" "${PROJECT_BINARY_DIR}/bin/apfel-config") configure_file("${PROJECT_SOURCE_DIR}/bin/apfel.in" "${PROJECT_BINARY_DIR}/bin/apfel") From 5018457a1c16b061420e22611af5a32ed46b42cd Mon Sep 17 00:00:00 2001 From: Dmitry Kalinkin Date: Sun, 10 Dec 2023 00:24:32 -0500 Subject: [PATCH 2/2] apfel-config.in: drop unused @exec_prefix@ --- CMakeLists.txt | 3 +-- bin/apfel-config.in | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9eec629..3275ef4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -43,8 +43,7 @@ message(STATUS "APFEL: APFEL_ENABLE_LHAPDF=${APFEL_ENABLE_LHAPDF}") message(STATUS "APFEL: APFEL_DOWNLOAD_PDFS=${APFEL_DOWNLOAD_PDFS}") # CONFIG SCRIPT ======================================================== -set(prefix ${CMAKE_INSTALL_PREFIX}) -set(exec_prefix "${prefix}") +set(prefix "${CMAKE_INSTALL_PREFIX}") set(includedir "${CMAKE_INSTALL_FULL_INCLUDEDIR}") set(libdir "${CMAKE_INSTALL_FULL_LIBDIR}") set(PACKAGE_VERSION "${apfel_VERSION}") diff --git a/bin/apfel-config.in b/bin/apfel-config.in index f9959e0..0269444 100644 --- a/bin/apfel-config.in +++ b/bin/apfel-config.in @@ -2,7 +2,6 @@ # These variables need to exist prefix=@prefix@ -exec_prefix=@exec_prefix@ if [[ $# -eq 0 || -n $( echo $* | egrep -- "--help|-h" ) ]]; then echo