summaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2016-09-13 11:29:25 -0700
committerGerald Combs <gerald@wireshark.org>2016-09-13 21:02:54 +0000
commit3c163637d6890ce5782fc204186629b789932d32 (patch)
tree35a67604c3e6a5538389523f90a4c56ecc7c33a4 /cmake
parent1e3c57b486b1d6a443cc29884337f983ca61bbfe (diff)
downloadwireshark-3c163637d6890ce5782fc204186629b789932d32.tar.gz
WSUG: Fixup PDF images.
Pass relative image directory paths to xsltproc. The DocBook documentation says you can use a URI, but trying to get that to work with CMake and Windows appears to be a path to tears and undignified wails of frustration. Add attributes for our different types of images and use them so that the PDFs don't scale our screenshots to an unusable size. Change-Id: I786d09d9ef9be3d423b2af426a8867739ae12c1a Reviewed-on: https://code.wireshark.org/review/17688 Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Gerald Combs <gerald@wireshark.org>
Diffstat (limited to 'cmake')
-rw-r--r--cmake/modules/FindXSLTPROC.cmake5
1 files changed, 3 insertions, 2 deletions
diff --git a/cmake/modules/FindXSLTPROC.cmake b/cmake/modules/FindXSLTPROC.cmake
index ea1d688ee8..c1baffb2f0 100644
--- a/cmake/modules/FindXSLTPROC.cmake
+++ b/cmake/modules/FindXSLTPROC.cmake
@@ -151,6 +151,7 @@ ENDMACRO(XML2HTML)
MACRO(XML2PDF _target_dep _output _dbk_source _stylesheet _paper)
# We depend on the docbook target to avoid parallel builds.
SET(_dbk_dep ${_target_dep}_docbook)
+ file(RELATIVE_PATH _img_relative_path ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR})
ADD_CUSTOM_COMMAND(
OUTPUT
${_output}
@@ -158,10 +159,10 @@ MACRO(XML2PDF _target_dep _output _dbk_source _stylesheet _paper)
COMMAND ${XSLTPROC_EXECUTABLE}
--path "${_xsltproc_path}"
--stringparam paper.type ${_paper}
- --stringparam img.src.path ${CMAKE_CURRENT_SOURCE_DIR}/
+ --stringparam img.src.path ${_img_relative_path}/
--stringparam use.id.as.filename 1
--stringparam admon.graphics 1
- --stringparam admon.graphics.path ${CMAKE_CURRENT_SOURCE_DIR}/common_graphics/
+ --stringparam admon.graphics.path ${_img_relative_path}/common_graphics/
--stringparam admon.graphics.extension .svg
--nonet
--output ${_output}.fo