Automate handling of man pages
At the moment, man page handling goes something like this:
add_executable(foo)
# etc. etc.
include(GNUInstallDirs)
file(ARCHIVE_CREATE OUTPUT foo.1.gz PATHS doc/foo.1 FORMAT raw COMPRESSION GZip)
install(FILES foo.1.gz DESTINATION "${CMAKE_INSTALL_MANDIR}/man1")
... for installing the man page for a program named foo
. Well, this is too cumbersome. We should be able to write something like
add_executable(foo)
# etc. etc.
set_target_property(MAN_PAGE doc/foo.1 MAN_CATEGORY 1)
and then, when one installs the foo
target, the man page gets installed to, at an appropriate location, and with the system-customary format (e.g. GZip compression).
Now, of course one wonder / bikeshed about exactly what features should be supported, and what about man page preprocessing, and what about non-executable specific manuals, and what about subcommand manuals, and what about info documents etc. - and that's all fine. But let something which includes this capability, more or less, be implemented