FindHTMLHelp.cmake 1.81 KB
Newer Older
1
# - This module looks for Microsoft HTML Help Compiler
2
# It defines:
3 4 5
#   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)
6 7
#

8 9 10 11 12 13 14 15 16 17
#=============================================================================
# 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.
#=============================================================================
18
# (To distribute this file outside of CMake, substitute the full
19 20
#  License text for the above reference.)

Sebastien Barre's avatar
Sebastien Barre committed
21
IF(WIN32)
22

Sebastien Barre's avatar
Sebastien Barre committed
23
  FIND_PROGRAM(HTML_HELP_COMPILER
24 25
    hhc
    "[HKEY_CURRENT_USER\\Software\\Microsoft\\HTML Help Workshop;InstallDir]"
26
    "$ENV{ProgramFiles}/HTML Help Workshop"
27
    "C:/Program Files/HTML Help Workshop" 
28
    )
29

Sebastien Barre's avatar
Sebastien Barre committed
30
  GET_FILENAME_COMPONENT(HTML_HELP_COMPILER_PATH "${HTML_HELP_COMPILER}" PATH)
31

Sebastien Barre's avatar
Sebastien Barre committed
32
  FIND_PATH(HTML_HELP_INCLUDE_PATH 
33 34 35
    htmlhelp.h 
    "${HTML_HELP_COMPILER_PATH}/include"
    "[HKEY_CURRENT_USER\\Software\\Microsoft\\HTML Help Workshop;InstallDir]/include"
36
    "$ENV{ProgramFiles}/HTML Help Workshop/include"
37
    "C:/Program Files/HTML Help Workshop/include" 
38
    )
39

Sebastien Barre's avatar
Sebastien Barre committed
40
  FIND_LIBRARY(HTML_HELP_LIBRARY 
41 42 43
    htmlhelp
    "${HTML_HELP_COMPILER_PATH}/lib"
    "[HKEY_CURRENT_USER\\Software\\Microsoft\\HTML Help Workshop;InstallDir]/lib"
44
    "$ENV{ProgramFiles}/HTML Help Workshop/lib"
45
    "C:/Program Files/HTML Help Workshop/lib"
46
    )
47

Sebastien Barre's avatar
Sebastien Barre committed
48
  MARK_AS_ADVANCED(
49 50
    HTML_HELP_COMPILER
    HTML_HELP_INCLUDE_PATH
51 52
    HTML_HELP_LIBRARY
    )
53

Sebastien Barre's avatar
Sebastien Barre committed
54
ENDIF(WIN32)