【问题标题】:qbs does not invoke qdocqbs 不调用 qdoc
【发布时间】:2018-01-04 07:18:11
【问题描述】:

一切都是有问题的

项目.qbs

import qbs

Project {
    name: "LoggingMessageHandler"

    Product {
        files: [
            "config.qdocconf",
            "messagehandler.cpp",
        ]
        name: "LoggingMessageHandler"
        type: project.staticBuild ? "staticlibrary" : "dynamiclibrary"

        Depends { name: "cpp" }
        Depends { name: "Qt.core" }

        cpp.cxxLanguageVersion: "c++11"
        cpp.defines: [
            "QT_DEPRECATED_WARNINGS",
            "QT_DISABLE_DEPRECATED_BEFORE=0x060000"
        ]

        Export {
            Depends { name: "cpp" }
            Depends { name: "Qt.core" }
            cpp.includePaths: [product.sourceDirectory]
        }

        Group {
            overrideTags: false
            files: "*.qdocconf"
            fileTags: "qdocconf-main"
        }

        Group {
            name: "install include"
            overrideTags: false
            files: [
                "messagehandler.h",
                "LoggingMessageHandler"
            ]
            qbs.install: project.installInclude
            qbs.installDir: "/include"
        }

    }

}

config.qdocconf:

project = LoggingMessageHandler
description = A set of QMessageHandler function to be used with the Qt Logging framework.

depends += qtcore

outputdir = ./doc
headerdirs = .
sourcedirs = .
exampledirs = .

项目目录层次结构:

PS:project.installInclude 是一个来自更高项目文件的开关集。

【问题讨论】:

    标签: qbs qdoc


    【解决方案1】:

    你没有告诉 qbs 你想要建立文档。为产品类型添加相关标签,例如“qch”。 qdoc 相关的文件标签见https://doc.qt.io/qbs/qt-modules.html#core-file-tags。有关产品类型的一般作用,请参阅https://doc.qt.io/qbs/rule-item.html#rules-and-product-types

    【讨论】:

    • 好吧,我去看看,但是我以为qbs会在有qdocconf-main filetag的时候触发doc规则。
    • 我确实明白你的意思,事实上生成库不需要生成文档这就是为什么 qbs 不调用 qdoc。
    猜你喜欢
    • 2018-08-25
    • 1970-01-01
    • 1970-01-01
    • 2019-02-24
    • 1970-01-01
    • 1970-01-01
    • 2017-03-01
    • 1970-01-01
    • 2014-06-29
    相关资源
    最近更新 更多