set(MANPAGES smolbote.1;smolbote-profile.5;smolboterc.5) find_program(SCDOC scdoc) foreach(F ${MANPAGES}) add_custom_command(OUTPUT ${F} COMMAND ${SCDOC} < ${CMAKE_CURRENT_SOURCE_DIR}/${F}.scd > ${F} VERBATIM) endforeach() add_custom_target(man DEPENDS ${MANPAGES}) install(FILES smolbote.1 DESTINATION /usr/local/man)