diff --git a/README.md b/README.md
index c61b337..be83b23 100644
--- a/README.md
+++ b/README.md
@@ -49,4 +49,7 @@ See [enhancements](https://github.com/cppit/jucipp/labels/enhancement) for plann
* [tiny-process-library](http://github.com/eidheim/tiny-process-library/) (downloaded directly with git --recursive, no need to install)
## Installation
-See [installation guide](http://github.com/cppit/jucipp/blob/master/docs/install.md).
+See [installation guide](docs/install.md).
+
+## Documentation
+See [how to build the API doc](docs/api.md).
diff --git a/docs/api.md b/docs/api.md
new file mode 100644
index 0000000..60230c0
--- /dev/null
+++ b/docs/api.md
@@ -0,0 +1,19 @@
+# juCi++ API doc
+
+## Prerequisites:
+ * doxygen
+ * plantuml
+ * install via apt-get or download from http://plantuml.com/
+ * see also http://plantuml.com/starting.html
+ * if downloaded either copy the jar file to /usr/bin or set the environment variable PLANTUML_PATH to point to the path containing the jar file)
+
+## How to build the API doc:
+```sh
+mkdir jucipp/build
+cd jucipp/build
+cmake ..
+make doc
+```
+
+## Where is the generated API documentation
+Open jupicpp/build/src/html/index.html
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index ee2b56f..fe31bd5 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -142,20 +142,14 @@ install(TARGETS ${project_name}
RUNTIME DESTINATION bin
)
-find_package(Plantuml)
-if(PLANTUML_FOUND)
-#message("plantuml found PLANTUML_JARFILE=${PLANTUML_JARFILE}")
-else(Plantuml_FOUND)
-message("plantuml not found. No UML diagrams are generated. You may define the environment variable PLANTUML_PATH...")
-endif(PLANTUML_FOUND)
-
# add a target to generate API documentation with Doxygen
+find_package(Plantuml)
find_package(Doxygen)
if(DOXYGEN_FOUND)
-configure_file(${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile @ONLY)
-add_custom_target(doc
-${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile
-WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
-COMMENT "Generating API documentation with Doxygen to ${CMAKE_CURRENT_BINARY_DIR}" VERBATIM
-)
+ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile @ONLY)
+ add_custom_target(doc
+ ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile
+ WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
+ COMMENT "Generating API documentation with Doxygen to ${CMAKE_CURRENT_BINARY_DIR}" VERBATIM
+ )
endif(DOXYGEN_FOUND)
diff --git a/src/Doxyfile.in b/src/Doxyfile.in
index 88d1bd0..500232b 100644
--- a/src/Doxyfile.in
+++ b/src/Doxyfile.in
@@ -2111,7 +2111,7 @@ HIDE_UNDOC_RELATIONS = YES
# set to NO
# The default value is: NO.
-HAVE_DOT = NO
+HAVE_DOT = YES
# The DOT_NUM_THREADS specifies the number of dot invocations doxygen is allowed
# to run in parallel. When set to 0 doxygen will base this on the number of
@@ -2198,7 +2198,7 @@ UML_LIMIT_NUM_FIELDS = 10
# The default value is: NO.
# This tag requires that the tag HAVE_DOT is set to YES.
-TEMPLATE_RELATIONS = NO
+TEMPLATE_RELATIONS = YES
# If the INCLUDE_GRAPH, ENABLE_PREPROCESSING and SEARCH_INCLUDES tags are set to
# YES then doxygen will generate a graph for each documented file showing the
@@ -2240,7 +2240,7 @@ CALL_GRAPH = NO
# The default value is: NO.
# This tag requires that the tag HAVE_DOT is set to YES.
-CALLER_GRAPH = NO
+CALLER_GRAPH = YES
# If the GRAPHICAL_HIERARCHY tag is set to YES then doxygen will graphical
# hierarchy of all classes instead of a textual one.
diff --git a/src/doc.h b/src/doc.h
deleted file mode 100644
index 0070d6e..0000000
--- a/src/doc.h
+++ /dev/null
@@ -1,26 +0,0 @@
-/**
- \mainpage
- juCi++ is a lightweight C++ IDE written in C++
- (Github page).
-
- \section sec_overview Overview
- The application entry point is the class Application.
-
- \section sec_dependencies Dependencies
- juCi++ is based on boost, gtkmm and libclang (among others).
- \startuml
- left to right direction
- component [juCi++] #LightGreen
- component [libclangmm] #Cyan
- component [tiny-process-library] #Cyan
- [juCi++] --> [boost-filesystem] : use
- [juCi++] --> [boost-regex] : use
- [juCi++] --> [gtkmm-3.0] : use
- [juCi++] --> [gtksourceviewmm-3.0] : use
- [juCi++] --> [aspell] : use
- [juCi++] --> [lbclang] : use
- [juCi++] --> [lbdb] : use
- [juCi++] --> [libclangmm] : use
- [juCi++] --> [tiny-process-library] : use
- \enduml
-*/
\ No newline at end of file
diff --git a/src/juci.h b/src/juci.h
index 81682f2..872b5ad 100644
--- a/src/juci.h
+++ b/src/juci.h
@@ -1,3 +1,30 @@
+/**
+ \mainpage
+ juCi++ is a lightweight C++ IDE written in C++
+ (Github page).
+
+ \section sec_overview Overview
+ The application entry point is the class Application.
+
+ \section sec_dependencies Dependencies
+ juCi++ is based on boost, gtkmm and libclang (among others).
+ \startuml
+ left to right direction
+ component [juCi++] #LightGreen
+ component [libclangmm] #Cyan
+ component [tiny-process-library] #Cyan
+ [juCi++] --> [boost-filesystem] : use
+ [juCi++] --> [boost-regex] : use
+ [juCi++] --> [gtkmm-3.0] : use
+ [juCi++] --> [gtksourceviewmm-3.0] : use
+ [juCi++] --> [aspell] : use
+ [juCi++] --> [lbclang] : use
+ [juCi++] --> [lbdb] : use
+ [juCi++] --> [libclangmm] : use
+ [juCi++] --> [tiny-process-library] : use
+ \enduml
+*/
+
#ifndef JUCI_JUCI_H_
#define JUCI_JUCI_H_