From fce2f2bb1f0e6cc2a07a26e0c35b994a3253131d Mon Sep 17 00:00:00 2001 From: Graham Bloice Date: Thu, 8 Jun 2017 13:38:40 +0100 Subject: 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 Tested-by: Petri Dish Buildbot Reviewed-by: Graham Bloice --- cmake/modules/FindHTMLHelp.cmake | 59 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 cmake/modules/FindHTMLHelp.cmake (limited to 'cmake') 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() -- cgit v1.2.1