QtcDocumentation.qbs 917 Bytes
Newer Older
1 2 3 4 5 6
import qbs

Product {
    builtByDefault: false
    type: [isOnlineDoc ? "qdoc-output" : "qch"]
    Depends { name: "Qt.core" }
7
    Depends { name: "qtc" }
8 9 10 11 12 13 14 15 16 17

    property path mainDocConfFile
    property bool isOnlineDoc

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

18
    property string versionTag: qtc.qtcreator_version.replace(/\.|-/g, "")
19 20
    Qt.core.qdocEnvironment: [
        "QTC_LICENSE_TYPE=" + project.licenseType,
21 22
        "QTC_VERSION=" + qtc.qtcreator_version,
        "QTC_VERSION_TAG=" + qtc.qtcreator_version,
23 24 25 26 27 28 29 30 31
        "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")
32
        qbs.installDir: qtc.ide_doc_path
33 34
    }
}