forked from qt-creator/qt-creator
Since we cannot directly use qt_docs.prf since it contains various Qt specific details, adapt it for use in Qt Creator. This can then be used e.g. by plugins that are not part of the Qt Creator repository. Change-Id: I87511cad74cbcae5cb58087e9a9386130d635aa9 Reviewed-by: Topi Reiniö <topi.reinio@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
55 lines
1.9 KiB
Plaintext
55 lines
1.9 KiB
Plaintext
# adapted from qt_docs.prf
|
|
|
|
isEmpty(VERSION): error("Include qtcreator.pri before including docs.pri!")
|
|
|
|
qtcver.name = QTC_VERSION
|
|
qtcver.value = $$VERSION
|
|
qtcvertag.name = QTC_VERSION_TAG
|
|
qtcvertag.value = $$replace(qtcver.value, \.,)
|
|
qtdocs.name = QT_INSTALL_DOCS
|
|
qtdocs.value = $$[QT_INSTALL_DOCS/src]
|
|
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 =
|
|
|
|
!build_online_docs: qtPrepareTool(QHELPGENERATOR, qhelpgenerator)
|
|
|
|
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
|
|
|
|
!isEmpty(html_docs.commands): html_docs.commands += &&
|
|
html_docs.commands += $$QDOC -outputdir $$shell_quote($$QTC_DOCS_OUTPUTDIR) $$qtc_doc $$DOC_INDEXES
|
|
|
|
!build_online_docs {
|
|
!isEmpty(qch_docs.commands): qch_docs.commands += &&
|
|
qch_docs.commands += $$QHELPGENERATOR $$shell_quote($$QTC_DOCS_OUTPUTDIR/$${QTC_DOCS_TARGET}.qhp) -o $$shell_quote($$IDE_DOC_PATH/$${QTC_DOCS_TARGET}.qch)
|
|
|
|
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
|