Skip to content

Commit

Permalink
Allow linking API docs to Qt docs through the use of qt doxygen tagfi…
Browse files Browse the repository at this point in the history
…les.

This is done using the new QT_TAG_FILE and QT_DOC_URL cmake options.
QT_TAG_FILE should be set to the path of the qt.tags tagfile. In ubuntu
this file is provided by the qt4-doc-html package, and is located at
/usr/share/qt4/doc/html/qt.tags
QT_DOC_URL should be currently set to http://doc.qt.io/qt-4.8/
  • Loading branch information
nyalldawson committed Jun 2, 2015
1 parent 93fb033 commit 10e738b
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion cmake_templates/Doxyfile.in
Expand Up @@ -1405,7 +1405,7 @@ SKIP_FUNCTION_MACROS = YES
# If a tag file is not located in the directory in which doxygen
# is run, you must also specify the path to the tagfile here.

TAGFILES =
TAGFILES = @DOXYGEN_TAGS@

# When a file name is specified after GENERATE_TAGFILE, doxygen will create
# a tag file that is based on the input files it reads.
Expand Down
13 changes: 13 additions & 0 deletions doc/CMakeLists.txt
Expand Up @@ -4,6 +4,9 @@ SET (WITH_APIDOC FALSE CACHE BOOL "Determines whether the QGIS API doxygen docum
# include doxygen documentation
SET (WITH_TXT2TAGS_PDF FALSE CACHE BOOL "Determines whether PDF should be generate for the txt2tags documentation")

# include Qt documentation
SET (QT_DOC_URL "http://doc.qt.io/qt-4.8/" CACHE STRING "URL for Qt docs")

INCLUDE(Txt2Tags)
FIND_TXT2TAGS()

Expand All @@ -28,6 +31,16 @@ INSTALL(FILES ../images/icons/qgis-icon-60x60.png DESTINATION ${QGIS_DATA_DIR}/d
IF(WITH_APIDOC)
FIND_PACKAGE(Doxygen)
IF(DOXYGEN_FOUND)

FIND_FILE(QT_TAG_FILE
NAMES qt4.tags qt4.tag qt.tags qt.tag
PATHS "${QT_DOC_DIR}"
DOC "Path to Qt documentation tag file (eg qt.tags)"
)
IF(QT_TAG_FILE)
SET(DOXYGEN_TAGS ${QT_TAG_FILE}=${QT_DOC_URL})
ENDIF(QT_TAG_FILE)

CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/cmake_templates/Doxyfile.in ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile @ONLY)
ADD_CUSTOM_TARGET(apidoc ALL
COMMAND ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile
Expand Down

0 comments on commit 10e738b

Please sign in to comment.