From 7578b7031921231400be78fa8c2893bbd5ea18df Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Tue, 19 Nov 2024 21:58:13 +0000 Subject: Avoid unnormalized paths for CMake install destinations CMake 3.31 is very noisy about our manpage (and to a lesser extend documentation in general) building as we used "//" and "/../" there. `cmake --help-policy CMP0177` documents the warning, so we could just decide on a value and deal with it, but given our usage is not really needed and rather trivial to change lets not pick a value and instead use a normalized path so we don't use different code paths in CMake depending on which CMake version we happen to be build with. --- CMake/Documentation.cmake | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'CMake') diff --git a/CMake/Documentation.cmake b/CMake/Documentation.cmake index f3eb4c5e1..d7f136020 100644 --- a/CMake/Documentation.cmake +++ b/CMake/Documentation.cmake @@ -154,14 +154,16 @@ function(xsltproc_one) if (DOC_MANPAGE) if (language) set(manpage_output "${CMAKE_CURRENT_BINARY_DIR}/${language}/${document}.${section}") + set(manpage_l10npath "/${language}") else() + set(manpage_l10npath "") set(manpage_output "${CMAKE_CURRENT_BINARY_DIR}/${document}.${section}") endif() set(manpage_stylesheet "${CMAKE_CURRENT_BINARY_DIR}/manpage-style.xsl") set(manpage_params) install(FILES ${manpage_output} - DESTINATION ${CMAKE_INSTALL_MANDIR}/${language}/man${section} + DESTINATION ${CMAKE_INSTALL_MANDIR}${manpage_l10npath}/man${section} OPTIONAL) endif() if (DOC_HTML) -- cgit v1.2.3-70-g09d2