From 58ab3a79a0b8a719b62485e8958d30ed8891d830 Mon Sep 17 00:00:00 2001 From: Marius Storm-Olsen Date: Tue, 15 May 2012 09:47:47 +0200 Subject: 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 --- mkspecs/features/default_post.prf | 2 +- mkspecs/features/default_pre.prf | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'mkspecs/features') diff --git a/mkspecs/features/default_post.prf b/mkspecs/features/default_post.prf index 0a0fd8dfa8..0593e458d3 100644 --- a/mkspecs/features/default_post.prf +++ b/mkspecs/features/default_post.prf @@ -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 } } diff --git a/mkspecs/features/default_pre.prf b/mkspecs/features/default_pre.prf index c3776c4da5..f4292c3312 100644 --- a/mkspecs/features/default_pre.prf +++ b/mkspecs/features/default_pre.prf @@ -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] -- cgit v1.2.3