summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--BUILD.txt1
-rw-r--r--CMakeLists.txt2
-rw-r--r--examples/CMakeLists.txt218
-rw-r--r--examples/Makefile.in129
-rw-r--r--examples/Makefile.win.in122
5 files changed, 221 insertions, 251 deletions
diff --git a/BUILD.txt b/BUILD.txt
index 3f9d421..276b442 100644
--- a/BUILD.txt
+++ b/BUILD.txt
@@ -29,6 +29,7 @@ Doxygen's cmake configuration provides a number of options:
- build_xmlparser Example showing how to parse doxygen's XML output.
- build_search Build external search tools (doxysearch and doxyindexer).
- build_doc Build user manual.
+- build_examples Build the example projects.
- use_sqlite3 Add support for sqlite3 output [experimental].
- use_libclang Add support for libclang parsing.
- win_static Link with /MT in stead of /MD on windows.
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 6223aa9..b8a749f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -19,6 +19,7 @@ option(build_app "Example showing how to embed doxygen in an application."
option(build_xmlparser "Example showing how to parse doxygen's XML output." OFF)
option(build_search "Build external search tools (doxysearch and doxyindexer)" OFF)
option(build_doc "Build user manual" OFF)
+option(build_examples "Build the example projects" OFF)
option(use_sqlite3 "Add support for sqlite3 output [experimental]." OFF)
option(use_libclang "Add support for libclang parsing." OFF)
option(win_static "Link with /MT in stead of /MD on windows" OFF)
@@ -126,6 +127,7 @@ add_subdirectory(libmd5)
add_subdirectory(qtools)
add_subdirectory(vhdlparser)
add_subdirectory(src)
+add_subdirectory(examples)
add_subdirectory(doc)
add_subdirectory(addon/doxmlparser)
diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt
new file mode 100644
index 0000000..66d4ecd
--- /dev/null
+++ b/examples/CMakeLists.txt
@@ -0,0 +1,218 @@
+if (build_examples)
+
+file(COPY ${EXAMPLE_DIR} DESTINATION ${PROJECT_BINARY_DIR})
+
+# class
+#add_custom_target(examples
+# COMMENT "Generating documentation for examples"
+# COMMAND ${EXECUTABLE_OUTPUT_PATH}/doxygen class.cfg
+# DEPENDS doxygen class.h class.cfg
+# OUTPUT class/html/index.html
+# WORKING_DIRECTORY examples
+# VERBATIM
+#)
+
+add_custom_target(examples
+ DEPENDS doxygen
+ class/html/index.html
+ define/html/index.html
+ enum/html/index.html
+ file/html/index.html
+ func/html/index.html
+ page/html/index.html
+ relates/html/index.html
+ author/html/index.html
+ par/html/index.html
+ overload/html/index.html
+ example/html/index.html
+ include/html/index.html
+ qtstyle/html/index.html
+ jdstyle/html/index.html
+ structcmd/html/index.html
+ autolink/html/index.html
+ restypedef/html/index.html
+ afterdoc/html/index.html
+ template/html/index.html
+ tag/html/index.html
+ group/html/index.html
+ diagrams/html/index.html
+ memgrp/html/index.html
+ docstring/html/index.html
+ pyexample/html/index.html
+ tclexample/html/index.html
+ mux/html/index.html
+ manual/html/index.html
+ WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/examples
+)
+
+add_custom_command(
+ COMMAND ${EXECUTABLE_OUTPUT_PATH}/doxygen class.cfg
+ DEPENDS doxygen class.h class.cfg
+ OUTPUT class/html/index.html
+)
+
+add_custom_command(
+ COMMAND ${EXECUTABLE_OUTPUT_PATH}/doxygen define.cfg
+ DEPENDS doxygen define.h define.cfg
+ OUTPUT define/html/index.html
+)
+
+add_custom_command(
+ COMMAND ${EXECUTABLE_OUTPUT_PATH}/doxygen enum.cfg
+ DEPENDS doxygen enum.h enum.cfg
+ OUTPUT enum/html/index.html
+)
+
+add_custom_command(
+ COMMAND ${EXECUTABLE_OUTPUT_PATH}/doxygen file.cfg
+ DEPENDS doxygen file.h file.cfg
+ OUTPUT file/html/index.html
+)
+
+add_custom_command(
+ COMMAND ${EXECUTABLE_OUTPUT_PATH}/doxygen func.cfg
+ DEPENDS doxygen func.h func.cfg
+ OUTPUT func/html/index.html
+)
+
+add_custom_command(
+ COMMAND ${EXECUTABLE_OUTPUT_PATH}/doxygen page.cfg
+ DEPENDS doxygen page.doc page.cfg
+ OUTPUT page/html/index.html
+)
+
+add_custom_command(
+ COMMAND ${EXECUTABLE_OUTPUT_PATH}/doxygen relates.cfg
+ DEPENDS doxygen relates.cpp relates.cfg
+ OUTPUT relates/html/index.html
+)
+
+add_custom_command(
+ COMMAND ${EXECUTABLE_OUTPUT_PATH}/doxygen author.cfg
+ DEPENDS doxygen author.cpp author.cfg
+ OUTPUT author/html/index.html
+)
+
+add_custom_command(
+ COMMAND ${EXECUTABLE_OUTPUT_PATH}/doxygen par.cfg
+ DEPENDS doxygen par.cpp par.cfg
+ OUTPUT par/html/index.html
+)
+
+add_custom_command(
+ COMMAND ${EXECUTABLE_OUTPUT_PATH}/doxygen overload.cfg
+ DEPENDS doxygen overload.cpp overload.cfg
+ OUTPUT overload/html/index.html
+)
+
+add_custom_command(
+ COMMAND ${EXECUTABLE_OUTPUT_PATH}/doxygen example.cfg
+ DEPENDS doxygen example.cpp example_test.cpp example.cfg
+ OUTPUT example/html/index.html
+)
+
+add_custom_command(
+ COMMAND ${EXECUTABLE_OUTPUT_PATH}/doxygen include.cfg
+ DEPENDS doxygen include.cpp example_test.cpp include.cfg
+ OUTPUT include/html/index.html
+)
+
+add_custom_command(
+ COMMAND ${EXECUTABLE_OUTPUT_PATH}/doxygen qtstyle.cfg
+ DEPENDS doxygen qtstyle.cpp qtstyle.cfg
+ OUTPUT qtstyle/html/index.html
+)
+
+add_custom_command(
+ COMMAND ${EXECUTABLE_OUTPUT_PATH}/doxygen jdstyle.cfg
+ DEPENDS doxygen jdstyle.cpp jdstyle.cfg
+ OUTPUT jdstyle/html/index.html
+)
+
+add_custom_command(
+ COMMAND ${EXECUTABLE_OUTPUT_PATH}/doxygen structcmd.cfg
+ DEPENDS doxygen structcmd.h structcmd.cfg
+ OUTPUT structcmd/html/index.html
+)
+
+add_custom_command(
+ COMMAND ${EXECUTABLE_OUTPUT_PATH}/doxygen autolink.cfg
+ DEPENDS doxygen autolink.cpp autolink.cfg
+ OUTPUT autolink/html/index.html
+)
+
+add_custom_command(
+ COMMAND ${EXECUTABLE_OUTPUT_PATH}/doxygen tag.cfg
+ DEPENDS doxygen tag.cpp tag.cfg example/html/index.html
+ OUTPUT tag/html/index.html
+)
+
+add_custom_command(
+ COMMAND ${EXECUTABLE_OUTPUT_PATH}/doxygen restypedef.cfg
+ DEPENDS doxygen restypedef.cpp restypedef.cfg
+ OUTPUT restypedef/html/index.html
+)
+
+add_custom_command(
+ COMMAND ${EXECUTABLE_OUTPUT_PATH}/doxygen afterdoc.cfg
+ DEPENDS doxygen afterdoc.h afterdoc.cfg
+ OUTPUT afterdoc/html/index.html
+)
+
+add_custom_command(
+ COMMAND ${EXECUTABLE_OUTPUT_PATH}/doxygen templ.cfg
+ DEPENDS doxygen templ.cpp templ.cfg
+ OUTPUT template/html/index.html
+)
+
+add_custom_command(
+ COMMAND ${EXECUTABLE_OUTPUT_PATH}/doxygen group.cfg
+ DEPENDS doxygen group.cpp group.cfg
+ OUTPUT group/html/index.html
+)
+
+add_custom_command(
+ COMMAND ${EXECUTABLE_OUTPUT_PATH}/doxygen memgrp.cfg
+ DEPENDS doxygen memgrp.cpp memgrp.cfg
+ OUTPUT memgrp/html/index.html
+)
+
+add_custom_command(
+ COMMAND ${EXECUTABLE_OUTPUT_PATH}/doxygen pyexample.cfg
+ DEPENDS doxygen pyexample.py pyexample.cfg
+ OUTPUT pyexample/html/index.html
+)
+
+add_custom_command(
+ COMMAND ${EXECUTABLE_OUTPUT_PATH}/doxygen tclexample.cfg
+ DEPENDS doxygen tclexample.tcl tclexample.cfg
+ OUTPUT tclexample/html/index.html
+)
+
+add_custom_command(
+ COMMAND ${EXECUTABLE_OUTPUT_PATH}/doxygen mux.cfg
+ DEPENDS doxygen mux.vhdl mux.cfg
+ OUTPUT mux/html/index.html
+)
+
+add_custom_command(
+ COMMAND ${EXECUTABLE_OUTPUT_PATH}/doxygen manual.cfg
+ DEPENDS doxygen manual.c manual.cfg
+ OUTPUT manual/html/index.html
+)
+
+add_custom_command(
+ COMMAND ${EXECUTABLE_OUTPUT_PATH}/doxygen docstring.cfg
+ DEPENDS doxygen docstring.py docstring.cfg
+ OUTPUT docstring/html/index.html
+)
+
+if (DOT)
+ add_custom_command(
+ COMMAND ${EXECUTABLE_OUTPUT_PATH}/doxygen diagrams.cfg
+ DEPENDS doxygen diagrams_a.h diagrams_b.h diagrams_c.h diagrams_d.h diagrams_e.h diagrams.cfg
+ OUTPUT diagrams/html/index.html
+ )
+endif(DOT)
+
+endif()
diff --git a/examples/Makefile.in b/examples/Makefile.in
deleted file mode 100644
index b9c9f20..0000000
--- a/examples/Makefile.in
+++ /dev/null
@@ -1,129 +0,0 @@
-DOXYGEN_BIN="$(DOXYGEN)/bin/doxygen"
-
-all: class/html/index.html \
- define/html/index.html \
- enum/html/index.html \
- file/html/index.html \
- func/html/index.html \
- page/html/index.html \
- relates/html/index.html \
- author/html/index.html \
- par/html/index.html \
- overload/html/index.html \
- example/html/index.html \
- include/html/index.html \
- qtstyle/html/index.html \
- jdstyle/html/index.html \
- structcmd/html/index.html \
- autolink/html/index.html \
- restypedef/html/index.html \
- afterdoc/html/index.html \
- template/html/index.html \
- tag/html/index.html \
- group/html/index.html \
- diagrams/html/index.html \
- memgrp/html/index.html \
- docstring/html/index.html \
- pyexample/html/index.html \
- tclexample/html/index.html \
- mux/html/index.html \
- manual/html/index.html
-
-# Disabled since it is broken :-(
-# dbusxml/html/index.html
-
-clean:
- rm -rf class define enum file func page relates author \
- par overload example include qtstyle jdstyle structcmd \
- autolink tag restypedef afterdoc template tag group diagrams \
- memgrp docstring pyexample mux manual dbusxml tclexample
-
-class/html/index.html: class.h class.cfg
- $(DOXYGEN_BIN) class.cfg
-
-define/html/index.html: define.h define.cfg
- $(DOXYGEN_BIN) define.cfg
-
-enum/html/index.html: enum.h enum.cfg
- $(DOXYGEN_BIN) enum.cfg
-
-file/html/index.html: file.h file.cfg
- $(DOXYGEN_BIN) file.cfg
-
-func/html/index.html: func.h func.cfg
- $(DOXYGEN_BIN) func.cfg
-
-page/html/index.html: page.doc page.cfg
- $(DOXYGEN_BIN) page.cfg
-
-relates/html/index.html: relates.cpp relates.cfg
- $(DOXYGEN_BIN) relates.cfg
-
-author/html/index.html: author.cpp author.cfg
- $(DOXYGEN_BIN) author.cfg
-
-par/html/index.html: par.cpp par.cfg
- $(DOXYGEN_BIN) par.cfg
-
-overload/html/index.html: overload.cpp overload.cfg
- $(DOXYGEN_BIN) overload.cfg
-
-example/html/index.html: example.cpp example_test.cpp example.cfg
- $(DOXYGEN_BIN) example.cfg
-
-include/html/index.html: include.cpp example_test.cpp include.cfg
- $(DOXYGEN_BIN) include.cfg
-
-qtstyle/html/index.html: qtstyle.cpp qtstyle.cfg
- $(DOXYGEN_BIN) qtstyle.cfg
-
-jdstyle/html/index.html: jdstyle.cpp jdstyle.cfg
- $(DOXYGEN_BIN) jdstyle.cfg
-
-structcmd/html/index.html: structcmd.h structcmd.cfg
- $(DOXYGEN_BIN) structcmd.cfg
-
-autolink/html/index.html: autolink.cpp autolink.cfg
- $(DOXYGEN_BIN) autolink.cfg
-
-tag/html/index.html: tag.cpp tag.cfg example/html/index.html
- $(DOXYGEN_BIN) tag.cfg
-
-restypedef/html/index.html: restypedef.cpp restypedef.cfg
- $(DOXYGEN_BIN) restypedef.cfg
-
-afterdoc/html/index.html: afterdoc.h afterdoc.cfg
- $(DOXYGEN_BIN) afterdoc.cfg
-
-template/html/index.html: templ.cpp templ.cfg
- $(DOXYGEN_BIN) templ.cfg
-
-group/html/index.html: group.cpp group.cfg
- $(DOXYGEN_BIN) group.cfg
-
-memgrp/html/index.html: memgrp.cpp memgrp.cfg
- $(DOXYGEN_BIN) memgrp.cfg
-
-pyexample/html/index.html: pyexample.py pyexample.cfg
- $(DOXYGEN_BIN) pyexample.cfg
-
-tclexample/html/index.html: tclexample.tcl tclexample.cfg
- $(DOXYGEN_BIN) tclexample.cfg
-
-mux/html/index.html: mux.vhdl mux.cfg
- $(DOXYGEN_BIN) mux.cfg
-
-manual/html/index.html: manual.c manual.cfg
- $(DOXYGEN_BIN) manual.cfg
-
-docstring/html/index.html: docstring.py docstring.cfg
- $(DOXYGEN_BIN) docstring.cfg
-
-#dbusxml/html/index.html: dbusxml.xml dbusxml.cfg
-# $(DOXYGEN_BIN) dbusxml.cfg
-
-diagrams/html/index.html: diagrams_a.h diagrams_b.h diagrams_c.h diagrams_d.h diagrams_e.h diagrams.cfg
-ifneq ($(HAVE_DOT),)
- $(DOXYGEN_BIN) diagrams.cfg
-endif
-
diff --git a/examples/Makefile.win.in b/examples/Makefile.win.in
deleted file mode 100644
index 914c5ed..0000000
--- a/examples/Makefile.win.in
+++ /dev/null
@@ -1,122 +0,0 @@
-DOXYDIR = ..\bin
-
-all: class/html/index.html \
- define/html/index.html \
- enum/html/index.html \
- file/html/index.html \
- func/html/index.html \
- page/html/index.html \
- relates/html/index.html \
- author/html/index.html \
- par/html/index.html \
- overload/html/index.html \
- example/html/index.html \
- include/html/index.html \
- qtstyle/html/index.html \
- jdstyle/html/index.html \
- structcmd/html/index.html \
- autolink/html/index.html \
- restypedef/html/index.html \
- afterdoc/html/index.html \
- template/html/index.html \
- tag/html/index.html \
- group/html/index.html \
- diagrams/html/index.html \
- memgrp/html/index.html \
- docstring/html/index.html \
- pyexample/html/index.html \
- tclexample/html/index.html \
- mux/html/index.html \
- manual/html/index.html
-
-clean:
- del /s/y class define enum file pyexample tclexample docstring
- del /s/y func page relates author
- del /s/y par overload example include qtstyle
- del /s/y jdstyle structcmd autolink resdefine mux manual
- del /s/y restypedef afterdoc template tag group diagrams memgrp
-
-class/html/index.html: class.h class.cfg
- $(DOXYDIR)\doxygen class.cfg
-
-define/html/index.html: define.h define.cfg
- $(DOXYDIR)\doxygen define.cfg
-
-enum/html/index.html: enum.h enum.cfg
- $(DOXYDIR)\doxygen enum.cfg
-
-file/html/index.html: file.h file.cfg
- $(DOXYDIR)\doxygen file.cfg
-
-func/html/index.html: func.h func.cfg
- $(DOXYDIR)\doxygen func.cfg
-
-page/html/index.html: page.doc page.cfg
- $(DOXYDIR)\doxygen page.cfg
-
-relates/html/index.html: relates.cpp relates.cfg
- $(DOXYDIR)\doxygen relates.cfg
-
-author/html/index.html: author.cpp author.cfg
- $(DOXYDIR)\doxygen author.cfg
-
-par/html/index.html: par.cpp par.cfg
- $(DOXYDIR)\doxygen par.cfg
-
-overload/html/index.html: overload.cpp overload.cfg
- $(DOXYDIR)\doxygen overload.cfg
-
-example/html/index.html: example.cpp example_test.cpp example.cfg
- $(DOXYDIR)\doxygen example.cfg
-
-include/html/index.html: include.cpp example_test.cpp include.cfg
- $(DOXYDIR)\doxygen include.cfg
-
-qtstyle/html/index.html: qtstyle.cpp qtstyle.cfg
- $(DOXYDIR)\doxygen qtstyle.cfg
-
-jdstyle/html/index.html: jdstyle.cpp jdstyle.cfg
- $(DOXYDIR)\doxygen jdstyle.cfg
-
-structcmd/html/index.html: structcmd.h structcmd.cfg
- $(DOXYDIR)\doxygen structcmd.cfg
-
-autolink/html/index.html: autolink.cpp autolink.cfg
- $(DOXYDIR)\doxygen autolink.cfg
-
-tag/html/index.html: tag.cpp tag.cfg
- $(DOXYDIR)\doxygen tag.cfg
-
-restypedef/html/index.html: restypedef.cpp restypedef.cfg
- $(DOXYDIR)\doxygen restypedef.cfg
-
-afterdoc/html/index.html: afterdoc.h afterdoc.cfg
- $(DOXYDIR)\doxygen afterdoc.cfg
-
-template/html/index.html: templ.cpp templ.cfg
- $(DOXYDIR)\doxygen templ.cfg
-
-group/html/index.html: group.cpp group.cfg
- $(DOXYDIR)\doxygen group.cfg
-
-memgrp/html/index.html: memgrp.cpp memgrp.cfg
- $(DOXYDIR)\doxygen memgrp.cfg
-
-pyexample/html/index.html: pyexample.py pyexample.cfg
- $(DOXYDIR)\doxygen pyexample.cfg
-
-tclexample/html/index.html: tclexample.tcl tclexample.cfg
- $(DOXYDIR)\doxygen tclexample.cfg
-
-mux/html/index.html: mux.vhdl mux.cfg
- $(DOXYDIR)\doxygen mux.cfg
-
-manual/html/index.html: manual.c manual.cfg
- $(DOXYDIR)\doxygen manual.cfg
-
-docstring/html/index.html: docstring.py docstring.cfg
- $(DOXYDIR)\doxygen docstring.cfg
-
-diagrams/html/index.html: diagrams_a.h diagrams_b.h diagrams_c.h diagrams_d.h diagrams_e.h diagrams.cfg
- $(DOXYDIR)\doxygen diagrams.cfg
-