aboutsummaryrefslogtreecommitdiffstats
path: root/cmake/modules
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2015-01-09 08:58:15 -0800
committerGerald Combs <gerald@wireshark.org>2015-01-09 17:49:37 +0000
commit4f658999e68791d083213eabf0de4202e5e4ab46 (patch)
tree7776f3794c1c55415f0d4bac2b77585aac9f34d6 /cmake/modules
parentffb6f10f4eb0ad126a8496981cfaac0fb324bbc8 (diff)
CMake: Migrate to hhc.cmake.
Remove FindHHC.cmake in favor of CMake's FindHTMLHelp. Remove the hhc.cmd wrapper. Change-Id: I548e58d2264c74596e9067d5053b056c35089b3c Reviewed-on: https://code.wireshark.org/review/6449 Reviewed-by: Gerald Combs <gerald@wireshark.org>
Diffstat (limited to 'cmake/modules')
-rw-r--r--cmake/modules/FindHHC.cmake26
-rw-r--r--cmake/modules/FindXSLTPROC.cmake4
-rw-r--r--cmake/modules/hhc.cmake11
3 files changed, 11 insertions, 30 deletions
diff --git a/cmake/modules/FindHHC.cmake b/cmake/modules/FindHHC.cmake
deleted file mode 100644
index 14752c422d..0000000000
--- a/cmake/modules/FindHHC.cmake
+++ /dev/null
@@ -1,26 +0,0 @@
-#
-# - Find the Microsoft HTML Help compiler.
-# Sets HHC_EXECUTABLE to the path to hhc.exe
-# Sets HHC_WRAPPER to a wrapper script that ignores hhc.exe's return value.
-#
-
-find_package(HTMLHelp)
-set(HHC_EXECUTABLE ${HTML_HELP_COMPILER})
-
-include(FindPackageHandleStandardArgs)
-find_package_handle_standard_args(HHC DEFAULT_MSG HHC_EXECUTABLE)
-
-mark_as_advanced(HHC_EXECUTABLE)
-
-if(WIN32)
- # hhc.exe returns 1 on success. Create a wrapper script that ignores
- # this.
- set(HHC_WRAPPER ${CMAKE_BINARY_DIR}/tools/hhc.cmd)
- file(TO_NATIVE_PATH "${HHC_EXECUTABLE}" HHC_EXECUTABLE_NATIVE_WINDOWS_PATH)
- configure_file(${CMAKE_SOURCE_DIR}/tools/hhc.cmd.in
- ${HHC_WRAPPER}
- NEWLINE_STYLE WIN32
- )
- find_package_handle_standard_args(HHC DEFAULT_MSG HHC_WRAPPER)
- mark_as_advanced(HHC_WRAPPER)
-endif()
diff --git a/cmake/modules/FindXSLTPROC.cmake b/cmake/modules/FindXSLTPROC.cmake
index f8ee12ff83..49b466051b 100644
--- a/cmake/modules/FindXSLTPROC.cmake
+++ b/cmake/modules/FindXSLTPROC.cmake
@@ -187,6 +187,7 @@ MACRO(XML2HHP _guide _docbooksource)
COMMAND ${CMAKE_COMMAND} -E make_directory ${_basedir}/${_gfxdir}
COMMAND ${CMAKE_COMMAND} -E copy_directory ${_gfxdir} ${_basedir}/${_gfxdir}
COMMAND ${CMAKE_COMMAND} -E copy_directory common_graphics ${_basedir}
+ # HTML Help doesn't render decimal character entities in the title.
COMMAND ${SED_EXECUTABLE}
-e "s|er&#8217;s Guide</title>|er's Guide</title>|"
< ${_docbooksource}
@@ -202,6 +203,9 @@ MACRO(XML2HHP _guide _docbooksource)
--nonet custom_layer_chm.xsl
${_docbook_plain_title}
DEPENDS
+ # AsciiDoc uses UTF-8 by default, which is unsupported by HTML
+ # Help. We may want to render an ISO-8859-1 version, or get rid
+ # of HTML Help.
${_docbooksource}
)
ENDMACRO(XML2HHP)
diff --git a/cmake/modules/hhc.cmake b/cmake/modules/hhc.cmake
index 2b98dfa562..6855ee7789 100644
--- a/cmake/modules/hhc.cmake
+++ b/cmake/modules/hhc.cmake
@@ -1,9 +1,12 @@
# hhc.exe returns 1 on success - which cmake instprets as failure in case
# of add_custom_command.
-# Params 0,1 and 2 are "cmake -P hhc.cmake"
-set(_param ${CMAKE_ARGV3})
+# Params are
+# cmake -P /path/to/hhc.cmake "/path/to/hhc.exe" project.hhp
+set(_hhc_executable ${CMAKE_ARGV3})
+set(_project_file ${CMAKE_ARGV4})
-EXECUTE_PROCESS(
- COMMAND ${HHC_EXECUTABLE} ${_param}
+execute_process(
+ COMMAND ${_hhc_executable} ${_project_file}
+ RESULT_VARIABLE _return_code
)