Skip to content

Commit

Permalink
Use relative install paths for extra cmake files
Browse files Browse the repository at this point in the history
Signed-off-by: Addisu Z. Taddese <[email protected]>
  • Loading branch information
azeey committed Apr 3, 2024
1 parent 31dfdcc commit 4ef7a8b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cmake/GzConfigureProject.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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}")
Expand Down

0 comments on commit 4ef7a8b

Please sign in to comment.