Set QMAKE_DOCS_INSTALLDIR to $$[QT_INSTALL_DOCS] to allow overriding in .pro
Normally you want to pass -installdir $$[QT_INSTALL_DOCS] to qdoc by default. However, if you want to force the generation of URL links to the documentation, the option cannot be specified. By setting the QMAKE_DOCS_INSTALLDIR variable in default_pre.prf a project may override it at will, as for example Qt Creator would do. Change-Id: Ib31f03acf4e8050cf2dd3aa33f3a10ed027f1df7 Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>bb10
parent
8b4bf5f816
commit
58ab3a79a0
|
|
@ -83,9 +83,9 @@ QMAKE_LIBDIR += $$QMAKE_LIBDIR_POST
|
|||
# apps and libs only generate docs if QMAKE_DOCS is set
|
||||
!isEmpty(QMAKE_DOCS) {
|
||||
!exists($$QMAKE_DOCS):error("Cannot find documentation specification file $$QMAKE_DOCS")
|
||||
exists($$[QT_INSTALL_DOCS]):QMAKE_DOCS_INDEX *= $$[QT_INSTALL_DOCS]
|
||||
qtPrepareTool(QDOC, qdoc)
|
||||
for(index, QMAKE_DOCS_INDEX):QDOC_INDEX += -indexdir $$index
|
||||
!isEmpty(QMAKE_DOCS_INSTALLDIR):QMAKE_DOCS_OPTIONS += -installdir $$QMAKE_DOCS_INSTALLDIR
|
||||
docs.commands += $$QDOC $$QMAKE_DOCS_OPTIONS $$QDOC_INDEX $$QMAKE_DOCS
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -53,3 +53,8 @@ CONFIG = lex yacc warn_on debug uic resources $$CONFIG
|
|||
unset(QTFWD)
|
||||
unset(PRO_BASENAME)
|
||||
}
|
||||
|
||||
# Populate the installdir which will be passed to qdoc in the default_post.prf
|
||||
# This allows a project to remove the installdir if need be, to trigger building online docs,
|
||||
# which Qt Creator does.
|
||||
QMAKE_DOCS_INSTALLDIR = $$[QT_INSTALL_DOCS]
|
||||
|
|
|
|||
Loading…
Reference in New Issue