From c6aba30419f065582cf1dcdd1251a1ddfed807f3 Mon Sep 17 00:00:00 2001
From: Martin Nolte <nolte@mathematik.uni-freiburg.de>
Date: Thu, 3 Dec 2015 22:59:35 +0100
Subject: [PATCH] make documentation build when using CMake build system

---
 CMakeLists.txt             | 17 ++++++++---------
 doc/doxygen/CMakeLists.txt |  2 ++
 doc/doxygen/Doxylocal      |  5 +++++
 doc/doxygen/mainpage.txt   |  5 +++++
 4 files changed, 20 insertions(+), 9 deletions(-)
 create mode 100644 doc/doxygen/CMakeLists.txt
 create mode 100644 doc/doxygen/Doxylocal
 create mode 100644 doc/doxygen/mainpage.txt

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 716b86175..d50c72fb5 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -31,18 +31,17 @@ include(GridType)
 
 # start a dune project with information from dune.module
 dune_project()
-set(SUBDIRS
-  dune
-  lib
-  m4
-  utils)
 
-foreach(i ${SUBDIRS})
-  add_subdirectory(${i})
-endforeach(i ${SUBDIRS})
+add_subdirectory(cmake/modules)
+add_subdirectory(m4)
+
+add_subdirectory(doc/doxygen)
+
+add_subdirectory(dune)
+add_subdirectory(lib)
 
 add_subdirectory(examples EXCLUDE_FROM_ALL)
-add_subdirectory(cmake/modules)
+add_subdirectory(utils)
 
 # finalize the dune project, e.g., generate config.h etc.
 finalize_dune_project(GENERATE_CONFIG_H_CMAKE)
diff --git a/doc/doxygen/CMakeLists.txt b/doc/doxygen/CMakeLists.txt
new file mode 100644
index 000000000..f7b8ea5c9
--- /dev/null
+++ b/doc/doxygen/CMakeLists.txt
@@ -0,0 +1,2 @@
+# shortcut for creating the Doxyfile.in and Doxyfile
+add_doxygen_target()
diff --git a/doc/doxygen/Doxylocal b/doc/doxygen/Doxylocal
new file mode 100644
index 000000000..2e61fe09b
--- /dev/null
+++ b/doc/doxygen/Doxylocal
@@ -0,0 +1,5 @@
+INPUT                 += @srcdir@/mainpage.txt \
+                         @top_srcdir@/dune/alugrid
+
+EXCLUDE               += @top_srcdir@/dune/alugrid/impl \
+                         @top_srcdir@/dune/alugrid/test
diff --git a/doc/doxygen/mainpage.txt b/doc/doxygen/mainpage.txt
new file mode 100644
index 000000000..ab751ad29
--- /dev/null
+++ b/doc/doxygen/mainpage.txt
@@ -0,0 +1,5 @@
+/** \mainpage dune-alugrid Automatic Documentation
+
+\section into Introduction
+
+*/
-- 
GitLab