cmakemanpage

How do I specify troff man page generation & installation using CMake?


I'm trying to switch a Makefile-based build to using CMake. I'm ok with specifying the build of the app itself, but - there's also a man (manual) page, in TROFF format.


Solution

  • If you want to compress something, use the file(ARCHIVE_CREATE ...) command.

    To install something that's intended to be a manpage, use the install(FILES ...) command and use CMAKE_INSTALL_MANDIR in the DESTINATION argument.