From 9525fa234b89145ed728f42768629ce19f2b5262 Mon Sep 17 00:00:00 2001
From: tobiglaser <76131623+tobiglaser@users.noreply.github.com>
Date: Thu, 5 May 2022 01:21:38 +0200
Subject: [PATCH] enable Doxygen in cmake

---
 CMakeLists.txt | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 5f2a6ae..488803a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -13,4 +13,17 @@ src/testCommandList.cpp
 )
 
 # Add include directory
-target_include_directories("Info3_Praktikum-test" PUBLIC include/)
\ No newline at end of file
+target_include_directories("Info3_Praktikum-test" PUBLIC include/)
+
+
+# Doxygen documentation
+find_package(Doxygen)
+if (DOXYGEN_FOUND)
+    add_custom_target( doc_doxygen ALL
+        COMMAND ${DOXYGEN_EXECUTABLE} Doxyfile
+        WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/..
+        COMMENT "Generating API documentation with Doxygen"
+        VERBATIM )
+else (DOXYGEN_FOUND)
+    message("Doxygen need to be installed to generate the doxygen documentation")
+endif (DOXYGEN_FOUND)
\ No newline at end of file
-- 
GitLab