diff options
author | Eike Ziller <eike.ziller@qt.io> | 2017-03-10 13:44:29 +0100 |
---|---|---|
committer | Eike Ziller <eike.ziller@qt.io> | 2017-03-23 09:53:22 +0000 |
commit | 926b4d1f3a3e01263d2e59d0d3fa3485726ca697 (patch) | |
tree | 6f5796c8da98fcc9aad608c4d06f590bd662fd92 /docs.pri | |
parent | c6e1bf6187618399860c4f3041c5f7cd725bd080 (diff) |
Further abstract docs.pri
So the same file can be used without adaptions in other projects (for
example Qbs).
Adds installation of the html documentation, which
should not hurt, or might even be preferable.
Change-Id: I8f6fbf072b348dfe13e54a5f2018ed6e24fc3a34
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Diffstat (limited to 'docs.pri')
-rw-r--r-- | docs.pri | 56 |
1 files changed, 10 insertions, 46 deletions
@@ -1,4 +1,7 @@ -# adapted from qt_docs.prf +# Creates targets for building Qt Creator documentation +# +# Usage: Include qtcreator.pri and define DOC_FILES to point to a list of qdocconf files, +# then include this .pri file isEmpty(VERSION): error("Include qtcreator.pri before including docs.pri!") @@ -12,50 +15,11 @@ qdocindex.name = QDOC_INDEX_DIR qdocindex.value = $$[QT_INSTALL_DOCS] qtcdocsdir.name = QTC_DOCS_DIR qtcdocsdir.value = $$IDE_SOURCE_TREE/doc -QT_TOOL_ENV = qtcver qtcvertag qtdocs qdocindex qtcdocsdir -qtPrepareTool(QDOC, qdoc) -QT_TOOL_ENV = +QDOC_ENV += qtcver qtcvertag qtdocs qdocindex qtcdocsdir -!build_online_docs: qtPrepareTool(QHELPGENERATOR, qhelpgenerator) +DOC_INDEX_PATHS += $$IDE_BUILD_TREE/doc +DOC_HTML_INSTALLDIR = $$INSTALL_DOC_PATH +DOC_QCH_OUTDIR = $$IDE_DOC_PATH +DOC_QCH_INSTALLDIR = $$INSTALL_DOC_PATH -QTC_DOCS_BASE_OUTDIR = $$OUT_PWD/doc -DOC_INDEXES = -indexdir $$shell_quote($$[QT_INSTALL_DOCS]) \ - -indexdir $$shell_quote($$IDE_BUILD_TREE/doc) - -for (qtc_doc, QTC_DOCS) { - !exists($$qtc_doc): error("Cannot find documentation specification file $$qtc_doc") - QTC_DOCS_TARGET = $$replace(qtc_doc, ^(.*/)?(.*)\\.qdocconf$, \\2) - QTC_DOCS_TARGETDIR = $$QTC_DOCS_TARGET - QTC_DOCS_OUTPUTDIR = $$QTC_DOCS_BASE_OUTDIR/$$QTC_DOCS_TARGETDIR - - html_docs_$${QTC_DOCS_TARGET}.commands = $$QDOC -outputdir $$shell_quote($$QTC_DOCS_OUTPUTDIR) $$qtc_doc $$DOC_INDEXES - QMAKE_EXTRA_TARGETS += html_docs_$${QTC_DOCS_TARGET} - - !isEmpty(html_docs.commands): html_docs.commands += && - html_docs.commands += $$eval(html_docs_$${QTC_DOCS_TARGET}.commands) - - !build_online_docs { - qch_docs_$${QTC_DOCS_TARGET}.commands = $$QHELPGENERATOR $$shell_quote($$QTC_DOCS_OUTPUTDIR/$${QTC_DOCS_TARGET}.qhp) -o $$shell_quote($$IDE_DOC_PATH/$${QTC_DOCS_TARGET}.qch) - qch_docs_$${QTC_DOCS_TARGET}.depends = html_docs_$${QTC_DOCS_TARGET} - QMAKE_EXTRA_TARGETS += qch_docs_$${QTC_DOCS_TARGET} - - !isEmpty(qch_docs.commands): qch_docs.commands += && - qch_docs.commands += $$eval(qch_docs_$${QTC_DOCS_TARGET}.commands) - - inst_qch_docs.files += $$IDE_DOC_PATH/$${QTC_DOCS_TARGET}.qch - } -} - -!build_online_docs { - qch_docs.depends = html_docs - inst_qch_docs.path = $$INSTALL_DOC_PATH - inst_qch_docs.CONFIG += no_check_exist no_default_install no_build - install_docs.depends = install_inst_qch_docs - docs.depends = qch_docs - INSTALLS += inst_qch_docs - QMAKE_EXTRA_TARGETS += qch_docs install_docs -} else { - docs.depends = html_docs -} - -QMAKE_EXTRA_TARGETS += html_docs docs +include(doc/doc_targets.pri) |