FindHTMLHelp.cmake 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. # Distributed under the OSI-approved BSD 3-Clause License. See accompanying
  2. # file Copyright.txt or https://cmake.org/licensing for details.
  3. #[=======================================================================[.rst:
  4. FindHTMLHelp
  5. ------------
  6. This module looks for Microsoft HTML Help Compiler
  7. It defines:
  8. ::
  9. HTML_HELP_COMPILER : full path to the Compiler (hhc.exe)
  10. HTML_HELP_INCLUDE_PATH : include path to the API (htmlhelp.h)
  11. HTML_HELP_LIBRARY : full path to the library (htmlhelp.lib)
  12. #]=======================================================================]
  13. if(WIN32)
  14. find_program(HTML_HELP_COMPILER
  15. NAMES hhc
  16. PATHS
  17. "[HKEY_CURRENT_USER\\Software\\Microsoft\\HTML Help Workshop;InstallDir]"
  18. PATH_SUFFIXES "HTML Help Workshop"
  19. )
  20. get_filename_component(HTML_HELP_COMPILER_PATH "${HTML_HELP_COMPILER}" PATH)
  21. find_path(HTML_HELP_INCLUDE_PATH
  22. NAMES htmlhelp.h
  23. PATHS
  24. "${HTML_HELP_COMPILER_PATH}/include"
  25. "[HKEY_CURRENT_USER\\Software\\Microsoft\\HTML Help Workshop;InstallDir]/include"
  26. PATH_SUFFIXES "HTML Help Workshop/include"
  27. )
  28. find_library(HTML_HELP_LIBRARY
  29. NAMES htmlhelp
  30. PATHS
  31. "${HTML_HELP_COMPILER_PATH}/lib"
  32. "[HKEY_CURRENT_USER\\Software\\Microsoft\\HTML Help Workshop;InstallDir]/lib"
  33. PATH_SUFFIXES "HTML Help Workshop/lib"
  34. )
  35. mark_as_advanced(
  36. HTML_HELP_COMPILER
  37. HTML_HELP_INCLUDE_PATH
  38. HTML_HELP_LIBRARY
  39. )
  40. endif()