Use doxygen_add_docs from FindDoxygen

Mon, 09 Jul 2018 23:40:56 +0200

author
David Demelier <markand@malikania.fr>
date
Mon, 09 Jul 2018 23:40:56 +0200
changeset 8
e7a1a3c4f850
parent 7
6ecc84c922b2
child 9
d9309daa0d7b

Use doxygen_add_docs from FindDoxygen

CMakeLists.txt file | annotate | diff | comparison | revisions
doc/Doxyfile.in file | annotate | diff | comparison | revisions
--- a/CMakeLists.txt	Mon Jul 09 23:34:00 2018 +0200
+++ b/CMakeLists.txt	Mon Jul 09 23:40:56 2018 +0200
@@ -48,25 +48,19 @@
 add_test(unicode unicode)
 
 if (DOXYGEN_FOUND)
-    if (NOT DOXYGEN_DOT_FOUND)
-        set(DOXYGEN_HAVE_DOT "NO")
-        set(DOXYGEN_DOT_PATH "")
-    else ()
-        set(DOXYGEN_HAVE_DOT "YES")
-        set(DOXYGEN_DOT_PATH "\"${DOXYGEN_DOT_EXECUTABLE}\"")
-    endif ()
+    set(DOXYGEN_PROJECT_NAME unicode)
+    set(DOXYGEN_PROJECT_NUMBER ${UNICODE_VERSION})
+    set(DOXYGEN_STRIP_FROM_PATH ${unicode_SOURCE_DIR})
+    set(DOXYGEN_WARN_NO_PARAMDOC YES)
+    set(DOXYGEN_WARN_AS_ERROR YES)
+    set(DOXYGEN_QUIET YES)
 
-    configure_file(
-        ${unicode_SOURCE_DIR}/doc/Doxyfile.in
-        ${unicode_BINARY_DIR}/Doxyfile
-    )
+    doxygen_add_docs(
+        doxygen
+        ${unicode_SOURCE_DIR}/doc/mainpage.cpp
+        ${unicode_SOURCE_DIR}/unicode.hpp
+        WORKING_DIRECTORY ${unicode_SOURCE_DIR}
+    ) 
 
-    add_custom_target(
-        doxygen ALL
-        COMMAND ${DOXYGEN_EXECUTABLE} ${unicode_BINARY_DIR}/Doxyfile
-        SOURCES
-            ${unicode_SOURCE_DIR}/doc/Doxyfile.in
-            ${unicode_SOURCE_DIR}/doc/mainpage.cpp
-        WORKING_DIRECTORY ${unicode_SOURCE_DIR}
-    )
+    add_dependencies(unicode doxygen)
 endif ()
--- a/doc/Doxyfile.in	Mon Jul 09 23:34:00 2018 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,17 +0,0 @@
-#
-# Doxyfile -- for libunicode++ (generated with 1.8.11)
-#
-
-PROJECT_NAME           = unicode
-PROJECT_NUMBER         = @BUNICODE_VERSION@
-PROJECT_BRIEF          = "UTF-8 to UTF-32 conversions and various operations"
-OUTPUT_DIRECTORY       = @unicode_BINARY_DIR@/doc
-STRIP_FROM_PATH        = @unicode_SOURCE_DIR@
-TAB_SIZE               = 4
-QUIET                  = YES
-WARN_NO_PARAMDOC       = YES
-WARN_AS_ERROR          = YES
-INPUT                  = @unicode_SOURCE_DIR@/unicode.hpp \
-                         @unicode_SOURCE_DIR@/doc/mainpage.cpp
-HAVE_DOT               = @DOXYGEN_HAVE_DOT@
-DOT_PATH               = @DOXYGEN_DOT_PATH@

mercurial