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 <peter@lekensteyn.nl>
Petri-Dish: Graham Bloice <graham.bloice@trihedral.com>
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
This commit is contained in:
Peter Wu 2017-03-31 18:13:01 +02:00 committed by Graham Bloice
parent 05c501373d
commit 1abbb503e4
1 changed files with 8 additions and 0 deletions

View File

@ -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 )