Commit dca43744 authored by Eric Engestrom's avatar Eric Engestrom
Browse files

cmake: add generation & installation of man pages

parent 32fb2f37
......@@ -75,3 +75,4 @@ target_link_libraries(ydotool ydotool_library dl pthread uInputPlus evdevPlus)
install(TARGETS ydotool DESTINATION ${CMAKE_INSTALL_BINDIR})
add_subdirectory(Daemon)
add_subdirectory(manpage)
function(man_page section page)
set(src "${CMAKE_CURRENT_SOURCE_DIR}/${page}.${section}.scd")
set(bin "${CMAKE_CURRENT_BINARY_DIR}/${page}.${section}")
add_custom_target(${page}.${section} ALL COMMAND scdoc < ${src} > ${bin})
install(FILES ${bin} DESTINATION ${CMAKE_INSTALL_MANDIR}/man${section}/)
endfunction(man_page)
man_page(1 ydotool)
man_page(8 ydotoold)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment