Skip to content

Commit

Permalink
Build documentation also when using qbs.
Browse files Browse the repository at this point in the history
Change-Id: I17330fa27effc633a06bc8f0a5864e771b831476
Reviewed-by: Jake Petroules <[email protected]>
  • Loading branch information
Christian Kandeler committed Apr 27, 2016
1 parent bc4a24d commit 4d5a836
Show file tree
Hide file tree
Showing 3 changed files with 90 additions and 0 deletions.
55 changes: 55 additions & 0 deletions doc/doc.qbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
import qbs

Project {
name: "documentation"

QtcDocumentation {
name: "user doc online"
isOnlineDoc: true
mainDocConfFile: "qtcreator-online.qdocconf"

files: [
"src/**/*",
]
}

QtcDocumentation {
name: "user doc offline"
isOnlineDoc: false
mainDocConfFile: "qtcreator.qdocconf"

files: [
"src/**/*",
]
}

QtcDocumentation {
name: "API doc online"
isOnlineDoc: true
mainDocConfFile: "api/qtcreator-dev-online.qdocconf"

Group {
name: "sources"
files: [
"api/*.qdoc",
"api/**/*",
]
excludeFiles: [mainDocConfFile]
}
}

QtcDocumentation {
name: "API doc offline"
isOnlineDoc: false
mainDocConfFile: "api/qtcreator-dev.qdocconf"

Group {
name: "sources"
files: [
"api/*.qdoc",
"api/**/*",
]
excludeFiles: [mainDocConfFile]
}
}
}
33 changes: 33 additions & 0 deletions qbs/imports/QtcDocumentation.qbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
import qbs

Product {
builtByDefault: false
type: [isOnlineDoc ? "qdoc-output" : "qch"]
Depends { name: "Qt.core" }

property path mainDocConfFile
property bool isOnlineDoc

Group {
name: "main qdocconf file"
files: [mainDocConfFile]
fileTags: ["qdocconf-main"]
}

property string versionTag: project.qtcreator_version.replace(/\.|-/g, "")
Qt.core.qdocEnvironment: [
"QTC_LICENSE_TYPE=" + project.licenseType,
"QTC_VERSION=" + project.qtcreator_version,
"QTC_VERSION_TAG=" + project.qtcreator_version,
"SRCDIR=" + sourceDirectory,
"QT_INSTALL_DOCS=" + Qt.core.docPath,
"QDOC_INDEX_DIR=" + Qt.core.docPath,
"VERSION_TAG=" + versionTag
]

Group {
fileTagsFilter: ["qch"]
qbs.install: !qbs.targetOS.contains("osx")
qbs.installDir: project.ide_doc_path
}
}
2 changes: 2 additions & 0 deletions qtcreator.qbs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Project {
name: "Qt Creator"
minimumQbsVersion: "1.5.0"
property bool withAutotests: qbs.buildVariant === "debug"
property string licenseType: "opensource"
property string ide_version_major: '4'
property string ide_version_minor: '0'
property string ide_version_release: '82'
Expand Down Expand Up @@ -62,6 +63,7 @@ Project {
qbsSearchPaths: "qbs"

references: [
"doc/doc.qbs",
"src/src.qbs",
"share/share.qbs",
"share/qtcreator/translations/translations.qbs",
Expand Down

0 comments on commit 4d5a836

Please sign in to comment.