Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use relative install paths for extra cmake files #422

Merged
merged 1 commit into from
Apr 5, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading