1 #-------------------------------------------------------------------------------
3 # | ____| _| |_ / __ \ /\ | \/ |
4 # | |__ _ __ ___ ___ / \| | | | / \ | \ / |
5 # | __| '__/ _ \/ _ ( (| |) ) | | |/ /\ \ | |\/| |
6 # | | | | | __/ __/\_ _/| |__| / ____ \| | | |
7 # |_| |_| \___|\___| |_| \____/_/ \_\_| |_|
9 # FreeFOAM: The Cross-Platform CFD Toolkit
11 # Copyright (C) 2008-2011 Michael Wild <themiwi@users.sf.net>
12 # Gerber van der Graaf <gerber_graaf@users.sf.net>
13 #-------------------------------------------------------------------------------
15 # This file is part of FreeFOAM.
17 # FreeFOAM is free software; you can redistribute it and/or modify it
18 # under the terms of the GNU General Public License as published by the
19 # Free Software Foundation; either version 2 of the License, or (at your
20 # option) any later version.
22 # FreeFOAM is distributed in the hope that it will be useful, but WITHOUT
23 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
24 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
27 # You should have received a copy of the GNU General Public License
28 # along with FreeFOAM; if not, write to the Free Software Foundation,
29 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
30 #-------------------------------------------------------------------------------
32 if(FOAM_ENABLE_XHTML_HELP OR FOAM_ENABLE_DOXYGEN_DOCS
33 OR FOAM_ENABLE_XHTML_GUIDES)
34 foam_configure_files(installImgFiles
38 img/CrossPlatformToolkit.png)
42 DESTINATION ${FOAM_INSTALL_DOC_PATH}/img COMPONENT doc)
44 foam_configure_files(installCSSFiles
49 if(FOAM_ENABLE_XHTML_HELP OR FOAM_ENABLE_XHTML_GUIDES)
50 # have asciidoc, use xhtml11.css and asciidoc-xhtml12.js from there
51 configure_file("${A2X_CONF_DIR}/stylesheets/xhtml11.css"
52 "${CMAKE_CURRENT_BINARY_DIR}/html/css/xhtml11.css" COPYONLY)
53 configure_file("${A2X_CONF_DIR}/stylesheets/docbook-xsl.css"
54 "${CMAKE_CURRENT_BINARY_DIR}/html/css/docbook-xsl.css" COPYONLY)
55 set(installXHTMLCSSFiles
56 "${CMAKE_CURRENT_BINARY_DIR}/html/css/xhtml11.css"
57 "${CMAKE_CURRENT_BINARY_DIR}/html/css/docbook-xsl.css")
58 configure_file("${A2X_CONF_DIR}/javascripts/asciidoc-xhtml11.js"
59 "${CMAKE_CURRENT_BINARY_DIR}/html/js/asciidoc-xhtml11.js" COPYONLY)
60 set(installXHTMLJavaScriptFiles
61 "${CMAKE_CURRENT_BINARY_DIR}/html/js/asciidoc-xhtml11.js")
63 # otherwise use our own
64 foam_configure_files(installXHTMLCSSFiles
69 foam_configure_files(installXHTMLJavaScriptFiles
72 js/asciidoc-xhtml11.js)
75 install(FILES ${installCSSFiles} ${installXHTMLCSSFiles}
76 DESTINATION ${FOAM_INSTALL_DOC_PATH}/css COMPONENT doc)
77 install(FILES ${installXHTMLJavaScriptFiles}
78 DESTINATION ${FOAM_INSTALL_DOC_PATH}/js COMPONENT doc)
81 if(FOAM_ENABLE_XHTML_HELP OR FOAM_ENABLE_XHTML_GUIDES)
83 -f "${CMAKE_BINARY_DIR}/data/asciidoc/html.conf"
95 list(APPEND opts -a foam-doc-for_sf)
97 if(FOAM_ENABLE_XHTML_GUIDES)
98 list(APPEND opts -a foam-have-ug)
100 if(FOAM_ENABLE_XHTML_HELP)
101 list(APPEND opts -a foam-have-man)
103 if(FOAM_ENABLE_DOXYGEN_DOCS)
104 list(APPEND opts -a foam-have-doxy)
107 foreach(f ChangeLog COPYING INSTALL README ReleaseNotes)
108 set(o "${CMAKE_CURRENT_BINARY_DIR}/html/${f}.html")
109 add_custom_command(OUTPUT "${o}"
110 COMMAND "${ASCIIDOC_EXECUTABLE}"
111 ${opts} -o "${o}" "${CMAKE_SOURCE_DIR}/${f}"
112 DEPENDS "${CMAKE_SOURCE_DIR}/${f}"
113 "${CMAKE_BINARY_DIR}/data/asciidoc/html.conf"
114 COMMENT "Generating ${f}.html"
116 list(APPEND pkgdocs "${o}")
118 add_custom_target(pkgdocs DEPENDS ${pkgdocs})
119 add_dependencies(doc pkgdocs)
120 install(FILES ${pkgdocs}
121 DESTINATION ${FOAM_INSTALL_DOC_PATH} COMPONENT doc)
124 add_subdirectory(man/manSource)
126 if(FOAM_ENABLE_DOXYGEN_DOCS)
127 add_subdirectory(Doxygen)
130 if(FOAM_ENABLE_XHTML_GUIDES AND FOAM_ENABLE_MATHJAX)
131 configure_file(js/MathJaxMacros.js
132 "${CMAKE_CURRENT_BINARY_DIR}/html/js/MathJaxMacros.js" COPYONLY)
133 install(FILES "${CMAKE_CURRENT_BINARY_DIR}/html/js/MathJaxMacros.js"
134 DESTINATION "${FOAM_INSTALL_DOC_PATH}/js" COMPONENT doc)
137 if(FOAM_GUIDES_FORMATS)
138 add_subdirectory(UserGuide)
141 # ------------------------- vim: set sw=2 sts=2 et: --------------- end-of-file