From 1abbb503e4242f56921b7ee950f185711e9f85c0 Mon Sep 17 00:00:00 2001 From: Peter Wu Date: Fri, 31 Mar 2017 18:13:01 +0200 Subject: cmake: fail if ENABLE_CHM_GUIDES but HTMLHelp is unavailable While "cmake -DENABLE_CHM_GUIDES=ON" succeeds on Linux, the actual build fails. Since the default for ENABLE_CHM_GUIDES is OFF, let's fail early when ENABLE_CHM_GUIDES is requested. When hcc.exe is found, do report the package as available. Change-Id: If6fc3eb18f1150c251e2886f1f16277669f8ec25 Reviewed-on: https://code.wireshark.org/review/20811 Petri-Dish: Peter Wu Petri-Dish: Graham Bloice Petri-Dish: Michael Mann Tested-by: Petri Dish Buildbot Reviewed-by: Graham Bloice --- docbook/CMakeLists.txt | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'docbook') diff --git a/docbook/CMakeLists.txt b/docbook/CMakeLists.txt index 29c64de8cd..7bdcaa8d19 100644 --- a/docbook/CMakeLists.txt +++ b/docbook/CMakeLists.txt @@ -23,6 +23,14 @@ find_package( LYNX ) find_package( XSLTPROC ) if(ENABLE_CHM_GUIDES) find_package( HTMLHelp ) + if(HTML_HELP_COMPILER) + # We do not need the HTML Help headers and library, just the + # compiler. To avoid confusion, report the package as found. + # https://gitlab.kitware.com/cmake/cmake/issues/15886 + set(HTMLHelp_FOUND 1) + else() + message(FATAL_ERROR "HTML Help Compiler is not installed (required for ENABLE_CHM_GUIDES)") + endif() endif() find_package( ASCIIDOC ) -- cgit v1.2.1