Added CMake target for documentation.

This commit is contained in:
Camilla Berglund 2013-03-18 21:21:12 +01:00
parent c6ef232dba
commit ebe02f94af
3 changed files with 15 additions and 5 deletions

View File

@ -14,11 +14,12 @@ option(GLFW_BUILD_EXAMPLES "Build the GLFW example programs" ON)
option(GLFW_BUILD_TESTS "Build the GLFW test programs" ON) option(GLFW_BUILD_TESTS "Build the GLFW test programs" ON)
option(BUILD_SHARED_LIBS "Build shared libraries" OFF) option(BUILD_SHARED_LIBS "Build shared libraries" OFF)
option(GLFW_DOCUMENT_INTERNALS "Include documentation of internal functions" OFF) set(DOXYGEN_SKIP_DOT TRUE)
find_package(Doxygen)
set(GLFW_DOC_HEADERS "${GLFW_SOURCE_DIR}/include/GL/glfw3.h ${GLFW_SOURCE_DIR}/include/GL/glfw3native.h") option(GLFW_DOCUMENT_INTERNALS "Include internals in documentation" OFF)
if (GLFW_DOCUMENT_INTERNALS) if (GLFW_DOCUMENT_INTERNALS)
set(GLFW_DOC_HEADERS "${GLFW_DOC_HEADERS} ${GLFW_SOURCE_DIR}/src/internal.h") set(GLFW_DOC_HEADERS "${GLFW_SOURCE_DIR}/src/internal.h")
endif() endif()
if (APPLE) if (APPLE)
@ -355,6 +356,10 @@ if (GLFW_BUILD_TESTS)
add_subdirectory(tests) add_subdirectory(tests)
endif() endif()
if (DOXYGEN_FOUND)
add_subdirectory(docs)
endif()
#-------------------------------------------------------------------- #--------------------------------------------------------------------
# Create generated files # Create generated files
#-------------------------------------------------------------------- #--------------------------------------------------------------------

5
docs/CMakeLists.txt Normal file
View File

@ -0,0 +1,5 @@
add_custom_target(docs ${DOXYGEN_EXECUTABLE}
WORKING_DIRECTORY ${GLFW_BINARY_DIR}/docs
COMMENT "Generating HTML documentation" VERBATIM)

View File

@ -656,7 +656,7 @@ WARN_LOGFILE = @GLFW_BINARY_DIR@/docs/warnings.txt
# directories like "/usr/src/myproject". Separate the files or directories # directories like "/usr/src/myproject". Separate the files or directories
# with spaces. # with spaces.
INPUT = @GLFW_DOC_HEADERS@ @GLFW_SOURCE_DIR@/docs/ INPUT = @GLFW_DOC_HEADERS@ @GLFW_SOURCE_DIR@/include/GL/ @GLFW_SOURCE_DIR@/docs/
# This tag can be used to specify the character encoding of the source files # 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 # that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is
@ -674,7 +674,7 @@ INPUT_ENCODING = UTF-8
# *.hxx *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.dox *.py # *.hxx *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.dox *.py
# *.f90 *.f *.for *.vhd *.vhdl # *.f90 *.f *.for *.vhd *.vhdl
FILE_PATTERNS = *.dox FILE_PATTERNS = *.h *.dox
# The RECURSIVE tag can be used to turn specify whether or not subdirectories # The RECURSIVE tag can be used to turn specify whether or not subdirectories
# should be searched for input files as well. Possible values are YES and NO. # should be searched for input files as well. Possible values are YES and NO.