Look for xsltproc when needed; to fail early

Signed-off-by: Pierre Hallot <hallotpierre@gmail.com>
This commit is contained in:
Pierre Hallot 2021-01-04 16:49:01 +01:00
parent c604cf8fd0
commit 2cbb3e45ca
No known key found for this signature in database
GPG Key ID: 43BB1CDDD7376D80

View File

@ -1,4 +1,9 @@
if(NOT WIN32)
find_program(XSLTPROC xsltproc REQUIRED)
if(NOT XSLTPROC)
message(FATAL_ERROR "xsltproc not found: manpages cannot be built")
endif()
function(compile_manpage page)
add_custom_command(OUTPUT ${CMAKE_SOURCE_DIR}/man/${page}
COMMAND xsltproc ${CMAKE_SOURCE_DIR}/man/${page}.xml -o ${CMAKE_SOURCE_DIR}/man/