aboutsummaryrefslogtreecommitdiffstats
path: root/doc/doc.qbs
blob: ed2eca4af8b0a829923f2ccea2b91dc19e8ad936 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
import qbs 1.0
import qbs.FileInfo
import qbs.Utilities

Product {
    name: "qbs documentation"
    builtByDefault: false
    type: "qch"
    Depends { name: "Qt.core" }
    Depends { name: "qbsbuildconfig" }
    Depends { name: "qbsversion" }

    files: [
        "external-resources.qdoc",
        "howtos.qdoc",
        "qbs.qdoc",
        "config/*.qdocconf",
        "reference/**/*",
    ]
    Group {
        name: "main qdocconf file"
        files: "qbs.qdocconf"
        fileTags: "qdocconf-main"
    }
    Group {
        name: "qtattribution.json files"
        files: [
            "../src/3rdparty/**/qt_attribution.json"
        ]
        fileTags: ["qtattribution"]
    }

    Rule {
        inputs: ["qtattribution"]
        Artifact {
            filePath: Utilities.getHash(input.filePath) + ".qtattributions.qdoc"
            fileTags: ["qdoc"]
        }

        prepare: {
            var tool = FileInfo.joinPaths(input.Qt.core.binPath, "qtattributionsscanner");
            var args = ["-o", output.filePath, FileInfo.joinPaths(FileInfo.path(input.filePath))];
            var cmd = new Command(tool, args);
            cmd.description = "running qtattributionsscanner";
            return cmd;
        }
    }

    property string versionTag: qbsversion.version.replace(/\.|-/g, "")
    Qt.core.qdocEnvironment: [
        "QBS_VERSION=" + qbsversion.version,
        "SRCDIR=" + path,
        "QT_INSTALL_DOCS=" + Qt.core.docPath,
        "QBS_VERSION_TAG=" + versionTag,
        "BUILDDIR=" + buildDirectory
    ]

    Group {
        fileTagsFilter: ["qdoc-output"]
        qbs.install: qbsbuildconfig.installHtml
        qbs.installDir: qbsbuildconfig.docInstallDir
        qbs.installSourceBase: Qt.core.qdocOutputDir
    }
    Group {
        fileTagsFilter: ["qch"]
        qbs.install: qbsbuildconfig.installQch
        qbs.installDir: qbsbuildconfig.docInstallDir
    }
}