From cbac4522d5cb258e55e3dcfad2e884995fcd95dc Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Wed, 6 Jan 2016 13:51:14 -0600 Subject: [PATCH] Also install a code gallery page if not found during cmake time. This makes sure that we always have a doxygen target to link to available. The target page may simply say that the code gallery was not available. --- doc/doxygen/CMakeLists.txt | 19 +++++++++------ doc/doxygen/DoxygenLayout.xml | 5 +++- doc/doxygen/code-gallery/CMakeLists.txt | 12 +++++++++- doc/doxygen/code-gallery/no-code-gallery.h | 27 ++++++++++++++++++++++ 4 files changed, 54 insertions(+), 9 deletions(-) create mode 100644 doc/doxygen/code-gallery/no-code-gallery.h diff --git a/doc/doxygen/CMakeLists.txt b/doc/doxygen/CMakeLists.txt index 8814c586e8..72ced2355f 100644 --- a/doc/doxygen/CMakeLists.txt +++ b/doc/doxygen/CMakeLists.txt @@ -155,16 +155,21 @@ IF (EXISTS ${DEAL_II_CODE_GALLERY_DIRECTORY}/README.md) LIST(APPEND _doxygen_input ${CMAKE_CURRENT_BINARY_DIR}/code-gallery/${_step}.h ) - LIST(APPEND _doxygen_input - ${CMAKE_CURRENT_BINARY_DIR}/code-gallery/code-gallery.h - ) ENDFOREACH() - - LIST(APPEND _doxygen_depend - ${CMAKE_CURRENT_BINARY_DIR}/code-gallery/code-gallery.h - ) ENDIF() + +# always make the doxygen run depend on the code-gallery.h file +# (whether generated from the code gallery or copied from +# no-code-gallery.h; both happen in code-gallery/CMakeLists.txt) +LIST(APPEND _doxygen_input + ${CMAKE_CURRENT_BINARY_DIR}/code-gallery/code-gallery.h +) +LIST(APPEND _doxygen_depend + ${CMAKE_CURRENT_BINARY_DIR}/code-gallery/code-gallery.h +) + + TO_STRING(_doxygen_image_path_string ${_doxygen_image_path}) TO_STRING(_doxygen_input_string ${_doxygen_input}) diff --git a/doc/doxygen/DoxygenLayout.xml b/doc/doxygen/DoxygenLayout.xml index edbe169648..710a8f78b3 100644 --- a/doc/doxygen/DoxygenLayout.xml +++ b/doc/doxygen/DoxygenLayout.xml @@ -3,7 +3,10 @@ - + + + + diff --git a/doc/doxygen/code-gallery/CMakeLists.txt b/doc/doxygen/code-gallery/CMakeLists.txt index e98cae16c3..1df5147b50 100644 --- a/doc/doxygen/code-gallery/CMakeLists.txt +++ b/doc/doxygen/code-gallery/CMakeLists.txt @@ -126,6 +126,16 @@ IF (EXISTS ${DEAL_II_CODE_GALLERY_DIRECTORY}/README.md) ENDFOREACH() ELSE() - MESSAGE(STATUS "Generating the code-gallery documentation is only possible if the code gallery exists in ${DEAL_II_CODE_GALLERY_DIRECTORY}.") + + # no copy of the code gallery is available. say so. but also + # install a file that creates a doxygen page we can link to + # nonetheless, so we don't get bad doxygen references + MESSAGE(STATUS "Setting up code gallery documentation.") + MESSAGE(STATUS " Skipping as no code gallery exists in ${DEAL_II_CODE_GALLERY_DIRECTORY}.") + + FILE(COPY ${CMAKE_CURRENT_SOURCE_DIR}/no-code-gallery.h + DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) + FILE(RENAME ${CMAKE_CURRENT_BINARY_DIR}/no-code-gallery.h + ${CMAKE_CURRENT_BINARY_DIR}/code-gallery.h) ENDIF() diff --git a/doc/doxygen/code-gallery/no-code-gallery.h b/doc/doxygen/code-gallery/no-code-gallery.h new file mode 100644 index 0000000000..4d93ccdaa0 --- /dev/null +++ b/doc/doxygen/code-gallery/no-code-gallery.h @@ -0,0 +1,27 @@ +// --------------------------------------------------------------------- +// +// Copyright (C) 2016 by the deal.II authors +// +// This file is part of the deal.II library. +// +// The deal.II library is free software; you can use it, redistribute +// it, and/or modify it under the terms of the GNU Lesser General +// Public License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// The full text of the license can be found in the file LICENSE at +// the top level of the deal.II distribution. +// +// --------------------------------------------------------------------- + + +/** + * @page CodeGallery The deal.II code gallery + * + * In order to create pages for the code gallery, there needs to be a + * version of the code gallery checked out alongside the other + * top-level directories in the deal.II/ directory. No + * such copy was found when configuring your version of deal.II. + * + * Instructions for obtaining the code gallery can be found at + * http://dealii.org/code-gallery.html . + */ -- 2.39.5