From 301c43efa9949dda591d04473accf1001f1ec947 Mon Sep 17 00:00:00 2001 From: Michael Wild Date: Mon, 26 Sep 2011 12:40:07 +0200 Subject: [PATCH] FIX: Newer versions of AsciiDoc renamed some files Signed-off-by: Michael Wild --- doc/CMakeLists.txt | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt index d585109e3..d8533427e 100644 --- a/doc/CMakeLists.txt +++ b/doc/CMakeLists.txt @@ -48,15 +48,31 @@ if(FOAM_ENABLE_XHTML_HELP OR FOAM_ENABLE_DOXYGEN_DOCS css/custom.css) if(FOAM_ENABLE_XHTML_HELP OR FOAM_ENABLE_XHTML_GUIDES) # have asciidoc, use xhtml11.css and asciidoc-xhtml12.js from there - configure_file("${A2X_CONF_DIR}/stylesheets/xhtml11.css" - "${CMAKE_CURRENT_BINARY_DIR}/html/css/xhtml11.css" COPYONLY) + if(EXISTS "${A2X_CONF_DIR}/stylesheets/xhtml11.css") + configure_file("${A2X_CONF_DIR}/stylesheets/xhtml11.css" + "${CMAKE_CURRENT_BINARY_DIR}/html/css/xhtml11.css" COPYONLY) + elseif(EXISTS "${A2X_CONF_DIR}/stylesheets/asciidoc.css") + # newer versions renamed xhtml11.css to asciidoc.css + configure_file("${A2X_CONF_DIR}/stylesheets/asciidoc.css" + "${CMAKE_CURRENT_BINARY_DIR}/html/css/xhtml11.css" COPYONLY) + else() + message(SEND_ERROR "Failed to find xhtml11.css or asciidoc.css") + endif() configure_file("${A2X_CONF_DIR}/stylesheets/docbook-xsl.css" "${CMAKE_CURRENT_BINARY_DIR}/html/css/docbook-xsl.css" COPYONLY) set(installXHTMLCSSFiles "${CMAKE_CURRENT_BINARY_DIR}/html/css/xhtml11.css" "${CMAKE_CURRENT_BINARY_DIR}/html/css/docbook-xsl.css") - configure_file("${A2X_CONF_DIR}/javascripts/asciidoc-xhtml11.js" - "${CMAKE_CURRENT_BINARY_DIR}/html/js/asciidoc-xhtml11.js" COPYONLY) + if(EXISTS "${A2X_CONF_DIR}/javascripts/asciidoc-xhtml11.js") + configure_file("${A2X_CONF_DIR}/javascripts/asciidoc-xhtml11.js" + "${CMAKE_CURRENT_BINARY_DIR}/html/js/asciidoc-xhtml11.js" COPYONLY) + elseif(EXISTS "${A2X_CONF_DIR}/javascripts/asciidoc.js") + # newer versions renamed asciidoc-xhtml11.js to asciidoc.js + configure_file("${A2X_CONF_DIR}/javascripts/asciidoc.js" + "${CMAKE_CURRENT_BINARY_DIR}/html/js/asciidoc-xhtml11.js" COPYONLY) + else() + message(SEND_ERROR "Failed to find asciidoc-xhtml11.js or asciidoc.js") + endif() set(installXHTMLJavaScriptFiles "${CMAKE_CURRENT_BINARY_DIR}/html/js/asciidoc-xhtml11.js") else() -- 2.11.4.GIT