diff --git a/CMakeLists.txt b/CMakeLists.txt index 6011f7c..77d01fe 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -92,6 +92,18 @@ install(FILES DESTINATION ${ConfigPackageLocation} ) +# Doxygen +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} + DEPENDS generatedCode + COMMENT "Generating API documentation with Doxygen" VERBATIM +) +endif() + # CPack settings set(CPACK_PACKAGE_NAME "decaf") set(CPACK_PACKAGE_VERSION ${PROJECT_VERSION}) diff --git a/Doxyfile b/Doxyfile.in similarity index 99% rename from Doxyfile rename to Doxyfile.in index 0265e0c..85ccd8b 100644 --- a/Doxyfile +++ b/Doxyfile.in @@ -58,7 +58,7 @@ PROJECT_LOGO = # entered, it will be relative to the location where doxygen was started. If # left blank the current directory will be used. -OUTPUT_DIRECTORY = build/doc +OUTPUT_DIRECTORY = doc # 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 format and @@ -751,7 +751,7 @@ WARN_LOGFILE = # spaces. # Note: If this tag is empty the current directory is searched. -INPUT = src/GENERATED/include src/GENERATED/include/decaf +INPUT = @GSOURCE_PATH@ # This tag can be used to specify the character encoding of the source files # that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses diff --git a/README.md b/README.md index d7832fa..e9f6318 100644 --- a/README.md +++ b/README.md @@ -110,6 +110,11 @@ are modified, to build only these files: make decaf_tables +Doxygen generated documentation is located in ./doc directory in the +binary tree after running + + make doc + ## Licensing Most of the source files here are by Mike Hamburg. Those files are (c)