Skip to content

Commit

Permalink
Add documentation generation through Doxygen
Browse files Browse the repository at this point in the history
  • Loading branch information
James Cagalawan committed Jan 31, 2017
1 parent 96c1ffd commit 07f7060
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 0 deletions.
14 changes: 14 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -76,3 +76,17 @@ set(BENCHMARK_ON TRUE CACHE BOOL "Build benchmark executables")
if(${BENCHMARK_ON})
add_subdirectory(benchmarks)
endif()

find_package(Doxygen)
if(DOXYGEN_FOUND)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/doc/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}
COMMENT "Generating API documentation with Doxygen" VERBATIM)
else(DOXYGEN_FOUND)
message("Doxygen not found.")
add_custom_target(doc
COMMENT "Doxygen was not found on this system so this target does not exist, please install it and re-run CMake." VERBATIM)
endif(DOXYGEN_FOUND)
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,3 +87,20 @@ Using CMake (manual)
```bash
cd build/lgmath && sudo make uninstall
```

## Generating Documentation

Using catkin tool (recommended)
In your catkin workspace
```bash
catkin build --make-arg
```


Using CMake (manual)
In your build folder
```bash
make doc
```

The documentation will be found in the `doc` subdirectory of the build folder.
12 changes: 12 additions & 0 deletions doc/Doxyfile.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# See http://www.stack.nl/~dimitri/doxygen/manual/config.html for configuration
# options.
DOXYFILE_ENCODING = UTF-8
PROJECT_NAME = "lgmath"
PROJECT_BRIEF = "Lie group mathematics library"
PROJECT_LOGO =
OUTPUT_DIRECTORY = @CMAKE_CURRENT_BINARY_DIR@/doc
CREATE_SUBDIRS = NO
OUTPUT_LANGUAGE = English
INPUT = @CMAKE_CURRENT_SOURCE_DIR@/src @CMAKE_CURRENT_SOURCE_DIR@/include
EXTRACT_ALL = YES
RECURSIVE = YES

0 comments on commit 07f7060

Please sign in to comment.