一切都是有问题的,我在项目中提供了一个简单的 qdocconf 文件,但是当 qdocconf 位于项目的 files 属性中时,qbs 不会调用 qdoc。
项目.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 是来自更高项目文件的开关集。