一切都有问题我提供了一个简单的qdocconf文件和我的项目,但qbs不会调用qdoc,而qdocconf在项目的files属性中。
Project.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是来自更高项目文件的开关集。
答案 0 :(得分: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。