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.
- How do I tell CMake to process it into an installable form (e.g. processing if necessary, compression), alongside the building of the executable?
- How do I get CMake to install it to an appropriate location?
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 useCMAKE_INSTALL_MANDIRin theDESTINATIONargument.