cmake: Quick-and-dirty fix for the DocBook XSL path on Debian

Without this, rebuilding the game manuals fails because
/usr/share/asciidoc/docbook-xsl/xhtml.xsl doesn't exist. We need to use
/etc/asciidoc/docbook-xsl/xhtml.xsl instead here.
This commit is contained in:
Ignacio R. Morelle 2015-01-16 00:19:14 -03:00
parent 65da0a9862
commit b270658f50
2 changed files with 12 additions and 2 deletions

View File

@ -107,6 +107,16 @@ if(NOT XSLTPROC_EXECUTABLE)
set(TRANSLATION_TOOLS_FOUND false)
endif(NOT XSLTPROC_EXECUTABLE)
find_path(ASCIIDOC_DOCBOOK_XSL_PATH
xhtml.xsl
HINTS /usr/share/asciidoc/docbook-xsl /etc/asciidoc/docbook-xsl
NO_DEFAULT_PATH
)
if(NOT ASCIIDOC_DOCBOOK_XSL_PATH)
message("asciidoc DocBook XSL path not found")
set(TRANSLATION_TOOLS_FOUND false)
endif(NOT ASCIIDOC_DOCBOOK_XSL_PATH)
if(NOT TRANSLATION_TOOLS_FOUND)
if(TranslationTools_FIND_REQUIRED)
message(FATAL_ERROR "Not all translation tools are found")

View File

@ -25,7 +25,7 @@ if(ENABLE_POT_UPDATE_TARGET)
COMMAND ${DOS2UNIX_EXECUTABLE} manual.en.xml
COMMAND ${XSLTPROC_EXECUTABLE} ${XSLTPROC_OPTIONS}
-o manual.en.html
/usr/share/asciidoc/docbook-xsl/xhtml.xsl
${ASCIIDOC_DOCBOOK_XSL_PATH}/xhtml.xsl
manual.en.xml
DEPENDS manual.txt
COMMENT "[update-po4a-manual] Building manual.xml."
@ -75,7 +75,7 @@ if(ENABLE_POT_UPDATE_TARGET)
# executes if the .html file exists.
set(CMD "${XSLTPROC_EXECUTABLE} ${XSLTPROC_OPTIONS}")
set(CMD "${CMD} -o manual.${LINGUA}.html")
set(CMD "${CMD} /usr/share/asciidoc/docbook-xsl/xhtml.xsl")
set(CMD "${CMD} ${ASCIIDOC_DOCBOOK_XSL_PATH}/xhtml.xsl")
set(CMD "${CMD} manual.${LINGUA}.xml")
add_custom_command(
OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/manual.${LINGUA}.html