From 4ef7a8b0ecca459d5a6b673393fc5b47f588b6b6 Mon Sep 17 00:00:00 2001 From: "Addisu Z. Taddese" Date: Wed, 3 Apr 2024 01:21:05 -0500 Subject: [PATCH] Use relative install paths for extra cmake files Signed-off-by: Addisu Z. Taddese --- cmake/GzConfigureProject.cmake | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cmake/GzConfigureProject.cmake b/cmake/GzConfigureProject.cmake index 381ade62..9cdda50a 100644 --- a/cmake/GzConfigureProject.cmake +++ b/cmake/GzConfigureProject.cmake @@ -30,6 +30,7 @@ # GZ_DESIGNATION_LOWER # GZ_DESIGNATION_UPPER # PKG_NAME +# PROJECT_CMAKE_EXTRAS_RELATIVE_INSTALL_DIR # PROJECT_CMAKE_EXTRAS_INSTALL_DIR # PROJECT_CMAKE_EXTRAS_PATH_TO_PREFIX # PROJECT_INCLUDE_DIR @@ -194,6 +195,7 @@ macro(gz_configure_project) #============================================================================ # Configure and install cmake extras files # Do this after _gz_setup_packages() to ensure GNUInstallDirs has been called + set(PROJECT_CMAKE_EXTRAS_RELATIVE_INSTALL_DIR ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}) set(PROJECT_CMAKE_EXTRAS_INSTALL_DIR ${CMAKE_INSTALL_FULL_LIBDIR}/cmake/${PROJECT_NAME}) file(RELATIVE_PATH PROJECT_CMAKE_EXTRAS_PATH_TO_PREFIX @@ -228,7 +230,7 @@ macro(gz_configure_project) if(is_cmake) install(FILES ${extra} - DESTINATION ${PROJECT_CMAKE_EXTRAS_INSTALL_DIR} + DESTINATION ${PROJECT_CMAKE_EXTRAS_RELATIVE_INSTALL_DIR} ) get_filename_component(extra_filename "${extra}" NAME) list(APPEND PACKAGE_CONFIG_EXTRA_FILES "${extra_filename}")