Skip to content
Permalink
Browse files
Allow linking API docs to Qt docs through the use of qt doxygen tagfi…
…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 10e738ba5f7eb62e1c94d4065746f4468e05f2b3
Showing with 14 additions and 1 deletion.
  1. +1 −1 cmake_templates/Doxyfile.in
  2. +13 −0 doc/CMakeLists.txt
@@ -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.
@@ -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()

@@ -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

0 comments on commit 10e738b

Please sign in to comment.