From 3c163637d6890ce5782fc204186629b789932d32 Mon Sep 17 00:00:00 2001 From: Gerald Combs Date: Tue, 13 Sep 2016 11:29:25 -0700 Subject: 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 Tested-by: Petri Dish Buildbot Reviewed-by: Gerald Combs --- cmake/modules/FindXSLTPROC.cmake | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'cmake') 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 -- cgit v1.2.1