CMake: Try to fix the xsltproc path.

Try to make the xsltproc path compatible with Cygwin. This is a blind
attempt to fix the Windows 8 buildbot. It works fine locally.

Change-Id: Ib9d55dd07c6b17cfddf313716227d347109d2103
Reviewed-on: https://code.wireshark.org/review/6438
Reviewed-by: Gerald Combs <gerald@wireshark.org>
This commit is contained in:
Gerald Combs 2015-01-08 16:55:26 -08:00
parent 67b1593921
commit 4bc8d0f9a8
1 changed files with 27 additions and 17 deletions

View File

@ -34,20 +34,30 @@ set (_common_xsltproc_args
--stringparam html.stylesheet ws.css --stringparam html.stylesheet ws.css
) )
#set (WSUG_XSLTPROC_ARGS if (WIN32 AND NOT "${CYGWIN_INSTALL_PATH}" STREQUAL "" AND ${XSLTPROC_EXECUTABLE} MATCHES "${CYGWIN_INSTALL_PATH}")
# --stringparam admon.graphics.path wsug_graphics/ FIND_PROGRAM(CYGPATH_EXECUTABLE
# NAMES cygpath
#WSDG_XSLTPROC_ARGS = \ PATHS ${CYGWIN_INSTALL_PATH}/bin
# --stringparam admon.graphics.path wsdg_graphics/ )
# # XXX Duplicate of TO_A2X_COMPATIBLE_PATH
#SINGLE_XSLTPROC_ARGS = \ MACRO( TO_XSLTPROC_COMPATIBLE_PATH _cmake_path _result )
# --nonet http://docbook.sourceforge.net/release/xsl/current/html/docbook.xsl execute_process(
# COMMAND ${CYGPATH_EXECUTABLE} -u ${_cmake_path}
#CHUNKED_XSLTPROC_ARGS = \ OUTPUT_VARIABLE _cygwin_path
# --nonet http://docbook.sourceforge.net/release/xsl/current/html/chunk.xsl )
# # cygpath adds a linefeed.
#HTMLHELP_XSLTPROC_ARGS = \ string(STRIP "${_cygwin_path}" _cygwin_path)
#
set( ${_result} ${_cygwin_path} )
ENDMACRO()
TO_XSLTPROC_COMPATIBLE_PATH( ${CMAKE_CURRENT_SOURCE_DIR} _xsltproc_current_source_dir )
TO_XSLTPROC_COMPATIBLE_PATH( ${CMAKE_CURRENT_BINARY_DIR} _xsltproc_current_binary_dir )
set ( _xsltproc_path "${_xsltproc_current_source_dir}:${_xsltproc_current_binary_dir}:${_xsltproc_current_binary_dir}/wsluarm_src")
else()
set ( _xsltproc_path "${CMAKE_CURRENT_SOURCE_DIR}:${CMAKE_CURRENT_BINARY_DIR}:${CMAKE_CURRENT_BINARY_DIR}/wsluarm_src")
endif()
# Translate XML to HTML # Translate XML to HTML
#XML2HTML( #XML2HTML(
@ -103,7 +113,7 @@ MACRO(XML2HTML _guide _mode _xmlsources _gfxsources)
COMMAND cmake COMMAND cmake
-E copy ${CMAKE_CURRENT_SOURCE_DIR}/ws.css ${_outdir} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/ws.css ${_outdir}
COMMAND ${XSLTPROC_EXECUTABLE} COMMAND ${XSLTPROC_EXECUTABLE}
--path "${CMAKE_CURRENT_SOURCE_DIR}:${CMAKE_CURRENT_BINARY_DIR}:${CMAKE_CURRENT_BINARY_DIR}/wsluarm_src" --path "${_xsltproc_path}"
--stringparam base.dir ${_basedir}/ --stringparam base.dir ${_basedir}/
${_common_xsltproc_args} ${_common_xsltproc_args}
--stringparam admon.graphics.path ${_gfxdir}/ --stringparam admon.graphics.path ${_gfxdir}/
@ -136,7 +146,7 @@ MACRO(XML2PDF _output _sources _stylesheet _paper)
OUTPUT OUTPUT
${_output} ${_output}
COMMAND ${XSLTPROC_EXECUTABLE} COMMAND ${XSLTPROC_EXECUTABLE}
--path "${CMAKE_CURRENT_SOURCE_DIR}:${CMAKE_CURRENT_BINARY_DIR}:${CMAKE_CURRENT_BINARY_DIR}/wsluarm_src" --path "${_xsltproc_path}"
--stringparam paper.type ${_paper} --stringparam paper.type ${_paper}
--stringparam img.src.path ${CMAKE_CURRENT_SOURCE_DIR}/ --stringparam img.src.path ${CMAKE_CURRENT_SOURCE_DIR}/
--stringparam use.id.as.filename 1 --stringparam use.id.as.filename 1
@ -182,7 +192,7 @@ MACRO(XML2HHP _guide _docbooksource)
< ${_docbooksource} < ${_docbooksource}
> ${_docbook_plain_title} > ${_docbook_plain_title}
COMMAND ${XSLTPROC_EXECUTABLE} COMMAND ${XSLTPROC_EXECUTABLE}
--path "${CMAKE_CURRENT_SOURCE_DIR}:${CMAKE_CURRENT_BINARY_DIR}:${CMAKE_CURRENT_BINARY_DIR}/wsluarm_src" --path "${_xsltproc_path}"
--stringparam base.dir ${_basedir}/ --stringparam base.dir ${_basedir}/
--stringparam htmlhelp.chm ${_output_chm} --stringparam htmlhelp.chm ${_output_chm}
--stringparam htmlhelp.hhp ${_output_hhp} --stringparam htmlhelp.hhp ${_output_hhp}