docs/src/CMakeLists.txt

changeset 390
d345541018fa
parent 372
a3e494af5c09
child 417
4b1203dbd0a6
     1.1 --- a/docs/src/CMakeLists.txt	Mon Dec 30 09:54:10 2019 +0100
     1.2 +++ b/docs/src/CMakeLists.txt	Sat Feb 06 19:11:44 2021 +0100
     1.3 @@ -1,7 +1,7 @@
     1.4  #
     1.5  # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
     1.6  #
     1.7 -# Copyright 2019 Mike Becker, Olaf Wintermann All rights reserved.
     1.8 +# Copyright 2021 Mike Becker, Olaf Wintermann All rights reserved.
     1.9  #
    1.10  # Redistribution and use in source and binary forms, with or without
    1.11  # modification, are permitted provided that the following conditions are met:
    1.12 @@ -28,7 +28,7 @@
    1.13  
    1.14  set(PANDOC_DESTDIR ${CMAKE_BINARY_DIR}/docs/web)
    1.15  set(PANDOC_ARGS -c ucx.css -B header.html -A footer.html -T 'UAP Common Extensions')
    1.16 -set(PANDOC_SRC index.md license.md modules.md install.md)
    1.17 +set(PANDOC_SRC index.md license.md install.md)
    1.18  set(LOGO_PATH ../../uaplogo.png)
    1.19  
    1.20  if (NOT EXISTS ${PANDOC_EXECUTABLE})
    1.21 @@ -42,6 +42,7 @@
    1.22  message(STATUS "HTML Documentation will be generated at: ${PANDOC_DESTDIR}.")
    1.23  file(MAKE_DIRECTORY ${PANDOC_DESTDIR})
    1.24  
    1.25 +# UCX 3.0 documentation
    1.26  foreach(source_file ${PANDOC_SRC})
    1.27      string(REPLACE .md .html dest_file ${source_file})
    1.28      string(PREPEND dest_file "${PANDOC_DESTDIR}/")
    1.29 @@ -54,10 +55,20 @@
    1.30      )
    1.31  endforeach()
    1.32  
    1.33 +# UCX 2.1 documentation
    1.34 +add_custom_target(docs-html-21
    1.35 +        COMMAND ${PANDOC_EXECUTABLE} -c ucx.css -B header-ucx2.html -A footer.html
    1.36 +            -T 'UAP Common Extensions' -o ${PANDOC_DESTDIR}/modules-ucx2.html modules-ucx2.md
    1.37 +        WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
    1.38 +        DEPENDS modules-ucx2.md
    1.39 +        COMMENT "Adding UCX 2.1 HTML documentation."
    1.40 +)
    1.41 +
    1.42 +# Collect all HTML documentation
    1.43  add_custom_target(docs-html
    1.44          COMMAND ${CMAKE_COMMAND} -E copy ucx.css ${PANDOC_DESTDIR}/ucx.css
    1.45          COMMAND ${CMAKE_COMMAND} -E copy ${LOGO_PATH} ${PANDOC_DESTDIR}/uaplogo.png
    1.46 -        DEPENDS ${PANDOC_DEST}
    1.47 +        DEPENDS ${PANDOC_DEST} docs-html-21
    1.48          WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
    1.49          COMMENT "Generating HTML documentation with pandoc."
    1.50  )

mercurial