diff options
author | Graham Bloice <graham.bloice@trihedral.com> | 2017-06-08 13:38:40 +0100 |
---|---|---|
committer | Graham Bloice <graham.bloice@trihedral.com> | 2017-06-08 13:30:54 +0000 |
commit | fce2f2bb1f0e6cc2a07a26e0c35b994a3253131d (patch) | |
tree | 723c283d39be9e3847a7335c687e850c1cc0262a /cmake | |
parent | a84fa8e8829a7b48b0942ae10b94cebd160cfd80 (diff) |
CMake: Add local copy of FindHTMLHelp.cmake
Add a local copy of FindHTMLHelp.cmake to search for hhc.exe that
includes the 32 bit program files locations "Program Files (x86)"
as this is where hhc.exe normally lives.
Change-Id: Ic5917a0765786ac483a7d4ef457043319d0e8501
Reviewed-on: https://code.wireshark.org/review/22037
Petri-Dish: Graham Bloice <graham.bloice@trihedral.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/modules/FindHTMLHelp.cmake | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/cmake/modules/FindHTMLHelp.cmake b/cmake/modules/FindHTMLHelp.cmake new file mode 100644 index 0000000000..169f77fefc --- /dev/null +++ b/cmake/modules/FindHTMLHelp.cmake @@ -0,0 +1,59 @@ +# Distributed under the OSI-approved BSD 3-Clause License. See accompanying +# file Copyright.txt or https://cmake.org/licensing for details. + +#.rst: +# FindHTMLHelp +# ------------ +# +# This module looks for Microsoft HTML Help Compiler +# +# It defines: +# +# :: +# +# HTML_HELP_COMPILER : full path to the Compiler (hhc.exe) +# HTML_HELP_INCLUDE_PATH : include path to the API (htmlhelp.h) +# HTML_HELP_LIBRARY : full path to the library (htmlhelp.lib) + +set(_PF86 "PROGRAMFILES(x86)") + +if(WIN32) + + find_program(HTML_HELP_COMPILER + hhc + "[HKEY_CURRENT_USER\\Software\\Microsoft\\HTML Help Workshop;InstallDir]" + "$ENV{ProgramFiles}/HTML Help Workshop" + "$ENV{_PF86}/HTML Help Workshop" + "C:/Program Files/HTML Help Workshop" + "C:/Program Files (x86)/HTML Help Workshop" + ) + + get_filename_component(HTML_HELP_COMPILER_PATH "${HTML_HELP_COMPILER}" PATH) + + find_path(HTML_HELP_INCLUDE_PATH + htmlhelp.h + "${HTML_HELP_COMPILER_PATH}/include" + "[HKEY_CURRENT_USER\\Software\\Microsoft\\HTML Help Workshop;InstallDir]/include" + "$ENV{ProgramFiles}/HTML Help Workshop/include" + "$ENV{_PF86}/HTML Help Workshop/include" + "C:/Program Files/HTML Help Workshop/include" + "C:/Program Files (x86)/HTML Help Workshop/include" + ) + + find_library(HTML_HELP_LIBRARY + htmlhelp + "${HTML_HELP_COMPILER_PATH}/lib" + "[HKEY_CURRENT_USER\\Software\\Microsoft\\HTML Help Workshop;InstallDir]/lib" + "$ENV{ProgramFiles}/HTML Help Workshop/lib" + "$ENV{_PF86}/HTML Help Workshop/lib" + "C:/Program Files/HTML Help Workshop/lib" + "C:/Program Files (x86)/HTML Help Workshop/lib" + ) + + mark_as_advanced( + HTML_HELP_COMPILER + HTML_HELP_INCLUDE_PATH + HTML_HELP_LIBRARY + ) + +endif() |