Skip to content

Commit

Permalink
GzConfigureProject: fix extras install
Browse files Browse the repository at this point in the history
The changes the install location of the extra cmake files
to use the CMAKE_INSTALL_LIBDIR variable, so that it
matches the installation of the cmake config files. This
fixes an issue when building debian packages.

Signed-off-by: Steve Peters <[email protected]>

Signed-off-by: Steve Peters <[email protected]>
  • Loading branch information
scpeters authored Jun 30, 2023
1 parent 21ddd8a commit 6e32df7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cmake/GzConfigureProject.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ macro(gz_configure_project)
_gz_string_ends_with("${extra}" ".cmake.in" is_template)
if(is_template)
get_filename_component(extra_filename "${extra}" NAME)
# cut of .in extension
# cut off .in extension
string(LENGTH "${extra_filename}" length)
math(EXPR offset "${length} - 3")
string(SUBSTRING "${extra_filename}" 0 ${offset} extra_filename)
Expand All @@ -180,7 +180,7 @@ macro(gz_configure_project)
if(is_cmake)
install(FILES
${extra}
DESTINATION lib/cmake/${PROJECT_NAME}/
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}/
)
get_filename_component(extra_filename "${extra}" NAME)
list(APPEND PACKAGE_CONFIG_EXTRA_FILES "${extra_filename}")
Expand Down

0 comments on commit 6e32df7

Please sign in to comment.