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
This commit is contained in:
Brad King 2017-06-09 11:13:32 -04:00
parent 591557ba45
commit fcbecbd2af

View File

@ -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(