Use CMAKE_INSTALL_MANDIR for installing man pages. (#8113)

Some Unix-like systems (e.g. the BSDs) keep man pages in man/,
others (e.g. Linux) keep man pages in share/man/.

By using CMAKE_INSTALL_MANDIR there's no need to maintain a
list of per-OS locations, and the proper location can be
automatically detected.

Fixes man page installation on NetBSD.

Signed-off-by: Nia Alarie <nia@NetBSD.org>

Signed-off-by: Nia Alarie <nia@NetBSD.org>
This commit is contained in:
nia 2022-08-16 10:01:50 +02:00 committed by GitHub
parent c9eea58ef2
commit 8f44b9cf87
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,9 +1,7 @@
include(GNUInstallDirs)
function(install_freerdp_man manpage section)
if(WITH_MANPAGES)
if(OPENBSD OR FREEBSD)
install(FILES ${manpage} DESTINATION man/man${section})
else()
install(FILES ${manpage} DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/man/man${section})
endif()
install(FILES ${manpage} DESTINATION ${CMAKE_INSTALL_MANDIR}/man${section})
endif()
endfunction()