about summary refs log tree commit diff homepage
diff options
context:
space:
mode:
authorJulian Büning <julian.buening@comsys.rwth-aachen.de>2023-05-29 16:42:49 +0200
committerCristian Cadar <c.cadar@imperial.ac.uk>2023-06-05 17:01:15 +0100
commitcaeafa442bb89994e550414670375878f4e50f79 (patch)
tree7094ce31e1743800154c1540f430ac78432de2ed
parent162f2125a6aac2dc91eaa4b1d62acce8e11461a4 (diff)
downloadklee-caeafa442bb89994e550414670375878f4e50f79.tar.gz
doxygen.cfg.in: DOXYGEN_OUTPUT_DIR
resolves a FIXME to streamline doxygen.cfg generation a bit
-rw-r--r--docs/CMakeLists.txt8
-rw-r--r--docs/doxygen.cfg.in12
2 files changed, 8 insertions, 12 deletions
diff --git a/docs/CMakeLists.txt b/docs/CMakeLists.txt
index c49f6d3e..964e9b03 100644
--- a/docs/CMakeLists.txt
+++ b/docs/CMakeLists.txt
@@ -15,8 +15,8 @@ if (ENABLE_DOXYGEN)
   find_package(Doxygen OPTIONAL_COMPONENTS dot)
   if (DOXYGEN_FOUND AND TARGET Doxygen::dot)
     message(STATUS "Doxygen and dot found")
-    set(abs_top_srcdir "${CMAKE_SOURCE_DIR}")
-    set(abs_top_builddir "${CMAKE_BINARY_DIR}")
+
+    set(DOXYGEN_OUTPUT_DIR "${CMAKE_CURRENT_BINARY_DIR}/doxygen")
 
     # Configure the Doxyfile
     configure_file(doxygen.cfg.in doxygen.cfg @ONLY)
@@ -29,10 +29,6 @@ if (ENABLE_DOXYGEN)
     )
     add_dependencies(docs doc-doxygen)
 
-    # FIXME: This variable should be used to set `OUTPUT_DIRECTORY` in
-    # doxygen.cfg
-    set(DOXYGEN_OUTPUT_DIR "${CMAKE_CURRENT_BINARY_DIR}/doxygen")
-
     set_directory_properties(PROPERTY ADDITIONAL_CLEAN_FILES
       "${DOXYGEN_OUTPUT_DIR}")
 
diff --git a/docs/doxygen.cfg.in b/docs/doxygen.cfg.in
index f06af13a..6c4aa54e 100644
--- a/docs/doxygen.cfg.in
+++ b/docs/doxygen.cfg.in
@@ -38,7 +38,7 @@ PROJECT_NUMBER         =
 # If a relative path is entered, it will be relative to the location 
 # where doxygen was started. If left blank the current directory will be used.
 
-OUTPUT_DIRECTORY       = @abs_top_builddir@/docs/doxygen
+OUTPUT_DIRECTORY       = @DOXYGEN_OUTPUT_DIR@
 
 # If the CREATE_SUBDIRS tag is set to YES, then doxygen will create 
 # 4096 sub-directories (in 2 levels) under the output directory of each output 
@@ -464,11 +464,11 @@ WARN_LOGFILE           =
 # directories like "/usr/src/myproject". Separate the files or directories 
 # with spaces.
 
-INPUT                  = @abs_top_srcdir@/tools/ \
-                         @abs_top_srcdir@/lib/ \
-                         @abs_top_srcdir@/include/ \
-                         @abs_top_srcdir@/docs/intro \
-                         @abs_top_srcdir@/docs/overview
+INPUT                  = @PROJECT_SOURCE_DIR@/tools/ \
+                         @PROJECT_SOURCE_DIR@/lib/ \
+                         @PROJECT_SOURCE_DIR@/include/ \
+                         @PROJECT_SOURCE_DIR@/docs/intro \
+                         @PROJECT_SOURCE_DIR@/docs/overview
 
 # This tag can be used to specify the character encoding of the source files that 
 # doxygen parses. Internally doxygen uses the UTF-8 encoding, which is also the default