build: add cmake rules for building manuals
This commit is contained in:
parent
5b2529ebd4
commit
b6da18fca8
|
|
@ -63,6 +63,7 @@ add_subdirectory(bsputil)
|
||||||
add_subdirectory(light)
|
add_subdirectory(light)
|
||||||
add_subdirectory(qbsp)
|
add_subdirectory(qbsp)
|
||||||
add_subdirectory(vis)
|
add_subdirectory(vis)
|
||||||
|
add_subdirectory(man)
|
||||||
|
|
||||||
#CPack configuration
|
#CPack configuration
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,20 @@
|
||||||
|
cmake_minimum_required (VERSION 2.6)
|
||||||
|
project (man)
|
||||||
|
|
||||||
|
find_program (GROFF NAMES groff)
|
||||||
|
|
||||||
|
if (GROFF-NOTFOUND)
|
||||||
|
message(FATAL_ERROR "Could not find groff")
|
||||||
|
endif(GROFF-NOTFOUND)
|
||||||
|
|
||||||
|
if(GROFF)
|
||||||
|
set(MANPAGES qbsp vis light bsputil bspinfo)
|
||||||
|
foreach(MANPAGE ${MANPAGES})
|
||||||
|
add_custom_command(
|
||||||
|
OUTPUT ${MANPAGE}.txt
|
||||||
|
COMMAND ${GROFF} -Tascii -man ${CMAKE_SOURCE_DIR}/man/${MANPAGE}.1 | col -bx > ${MANPAGE}.txt
|
||||||
|
)
|
||||||
|
add_custom_target(man_${MANPAGE} ALL DEPENDS ${MANPAGE}.txt)
|
||||||
|
install(FILES ${MANPAGE}.txt DESTINATION doc)
|
||||||
|
endforeach()
|
||||||
|
endif(GROFF)
|
||||||
Loading…
Reference in New Issue