From 087efb572ace9cbb864c1aab7357916cb7b0428b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Mon, 8 Oct 2012 17:19:14 +0200 Subject: Modularize documenation build MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit qdocconf files can now reference $QT_INSTALL_DOCS to pick up e.g. global includes, instead of using relative paths. Qt modules will automatically get a doc target that builds and installs into the right place (including supporting shadow-builds) if they set QMAKE_DOCS before loading(qt_module). Change-Id: Ia408385199e56e3ead0afa45645a059d1a8b0d48 Reviewed-by: Tor Arne Vestbø --- mkspecs/features/default_post.prf | 1 + mkspecs/features/qt_installs.prf | 8 ++++++++ mkspecs/features/qt_module.prf | 5 +++++ 3 files changed, 14 insertions(+) (limited to 'mkspecs') diff --git a/mkspecs/features/default_post.prf b/mkspecs/features/default_post.prf index b717a8d352..2542cb2f9d 100644 --- a/mkspecs/features/default_post.prf +++ b/mkspecs/features/default_post.prf @@ -92,6 +92,7 @@ QMAKE_LIBDIR += $$QMAKE_LIBDIR_POST !exists($$QMAKE_DOCS):error("Cannot find documentation specification file $$QMAKE_DOCS") qtPrepareTool(QDOC, qdoc) for(index, QMAKE_DOCS_INDEX):QDOC_INDEX += -indexdir $$index + !isEmpty(QMAKE_DOCS_OUTPUTDIR):QMAKE_DOCS_OPTIONS += -outputdir $$QMAKE_DOCS_OUTPUTDIR !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/qt_installs.prf b/mkspecs/features/qt_installs.prf index 100ad59c66..507d3ebddc 100644 --- a/mkspecs/features/qt_installs.prf +++ b/mkspecs/features/qt_installs.prf @@ -47,3 +47,11 @@ qt_install_module { warning("Project $$basename(_PRO_FILE_) is a module, but has not defined MODULE_PRI, which is required for Qt to expose the module to other projects.") } } + +qt_install_module_docs { + module_docs.files = $$QMAKE_DOCS_OUTPUTDIR + module_docs.path = $$[QT_INSTALL_DOCS] + module_docs.CONFIG += no_check_exist directory + module_docs.depends += docs + INSTALLS += module_docs +} diff --git a/mkspecs/features/qt_module.prf b/mkspecs/features/qt_module.prf index 7c2459b86e..ee5215dff3 100644 --- a/mkspecs/features/qt_module.prf +++ b/mkspecs/features/qt_module.prf @@ -121,6 +121,11 @@ CONFIG += qt warn_on depend_includepath CONFIG += qmake_cache target_qt CONFIG -= fix_output_dirs +!isEmpty(QMAKE_DOCS) { + QMAKE_DOCS_OUTPUTDIR = $$eval(QT.$${MODULE}.docs)/qt$${MODULE} + CONFIG += qt_install_module_docs +} + # If Qt was configured with -debug-and-release then build the module the same way if(win32|mac):!macx-xcode { contains(QT_CONFIG, debug_and_release):CONFIG += debug_and_release -- cgit v1.2.3