diff options
author | Brad King <brad.king@kitware.com> | 2017-06-09 15:13:32 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2017-06-09 15:13:32 (GMT) |
commit | fcbecbd2afcf3fcfd4662946615fec5e4c73ed84 (patch) | |
tree | 03d7e3b0bb9af7996c95baa9a7554e089deff885 /Modules | |
parent | 591557ba450f1f24610ea0eefcb4e1d7665fae25 (diff) | |
download | CMake-fcbecbd2afcf3fcfd4662946615fec5e4c73ed84.zip CMake-fcbecbd2afcf3fcfd4662946615fec5e4c73ed84.tar.gz CMake-fcbecbd2afcf3fcfd4662946615fec5e4c73ed84.tar.bz2 |
FindHTMLHelp: Use PATH_SUFFIXES to search under Program Files
The find commands already know how to search in variants of the
Program Files folders on Windows. Use PATH_SUFFIXES to tell them
under what directory within Program Files to find htmlhelp.
Fixes: #16950
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/FindHTMLHelp.cmake | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/Modules/FindHTMLHelp.cmake b/Modules/FindHTMLHelp.cmake index 84e2458..6aab8a7 100644 --- a/Modules/FindHTMLHelp.cmake +++ b/Modules/FindHTMLHelp.cmake @@ -18,28 +18,28 @@ if(WIN32) find_program(HTML_HELP_COMPILER - hhc - "[HKEY_CURRENT_USER\\Software\\Microsoft\\HTML Help Workshop;InstallDir]" - "$ENV{ProgramFiles}/HTML Help Workshop" - "C:/Program Files/HTML Help Workshop" + NAMES hhc + PATHS + "[HKEY_CURRENT_USER\\Software\\Microsoft\\HTML Help Workshop;InstallDir]" + PATH_SUFFIXES "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" - "C:/Program Files/HTML Help Workshop/include" + NAMES htmlhelp.h + PATHS + "${HTML_HELP_COMPILER_PATH}/include" + "[HKEY_CURRENT_USER\\Software\\Microsoft\\HTML Help Workshop;InstallDir]/include" + PATH_SUFFIXES "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" - "C:/Program Files/HTML Help Workshop/lib" + NAMES htmlhelp + PATHS + "${HTML_HELP_COMPILER_PATH}/lib" + "[HKEY_CURRENT_USER\\Software\\Microsoft\\HTML Help Workshop;InstallDir]/lib" + PATH_SUFFIXES "HTML Help Workshop/lib" ) mark_as_advanced( |