FindHTMLHelp.cmake 1.85 KB
Newer Older
1 2 3 4 5 6
#.rst:
# FindHTMLHelp
# ------------
#
# This module looks for Microsoft HTML Help Compiler
#
7 8
# It defines:
#
9 10 11 12 13
# ::
#
#    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)
14

15 16 17 18 19 20 21 22 23 24
#=============================================================================
# Copyright 2002-2009 Kitware, Inc.
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
#=============================================================================
25
# (To distribute this file outside of CMake, substitute the full
26 27
#  License text for the above reference.)

28
if(WIN32)
29

30
  find_program(HTML_HELP_COMPILER
31 32
    hhc
    "[HKEY_CURRENT_USER\\Software\\Microsoft\\HTML Help Workshop;InstallDir]"
33
    "$ENV{ProgramFiles}/HTML Help Workshop"
34
    "C:/Program Files/HTML Help Workshop"
35
    )
36

37
  get_filename_component(HTML_HELP_COMPILER_PATH "${HTML_HELP_COMPILER}" PATH)
38

39
  find_path(HTML_HELP_INCLUDE_PATH
40
    htmlhelp.h
41 42
    "${HTML_HELP_COMPILER_PATH}/include"
    "[HKEY_CURRENT_USER\\Software\\Microsoft\\HTML Help Workshop;InstallDir]/include"
43
    "$ENV{ProgramFiles}/HTML Help Workshop/include"
44
    "C:/Program Files/HTML Help Workshop/include"
45
    )
46

47
  find_library(HTML_HELP_LIBRARY
48 49 50
    htmlhelp
    "${HTML_HELP_COMPILER_PATH}/lib"
    "[HKEY_CURRENT_USER\\Software\\Microsoft\\HTML Help Workshop;InstallDir]/lib"
51
    "$ENV{ProgramFiles}/HTML Help Workshop/lib"
52
    "C:/Program Files/HTML Help Workshop/lib"
53
    )
54

55
  mark_as_advanced(
56 57
    HTML_HELP_COMPILER
    HTML_HELP_INCLUDE_PATH
58 59
    HTML_HELP_LIBRARY
    )
60

61
endif()