From 2cbb3e45ca3f9e3392acc607ded7f46b4f2cd798 Mon Sep 17 00:00:00 2001 From: Pierre Hallot Date: Mon, 4 Jan 2021 16:49:01 +0100 Subject: [PATCH] Look for xsltproc when needed; to fail early Signed-off-by: Pierre Hallot --- man/CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/man/CMakeLists.txt b/man/CMakeLists.txt index 4390c1ef..9399a686 100644 --- a/man/CMakeLists.txt +++ b/man/CMakeLists.txt @@ -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/