[Qbs] Generating a c++ class with Q_OBJECT
Raphael Cotty
raphael.cotty at gmail.com
Tue Aug 27 19:57:09 CEST 2019
Hi,
I am trying to use the KDSoap tool with qbs.
The kdwsdl2cpp generates a class (source and header) and the header uses
the Q_OBJECT macro.
CppApplication {
name: "test"
cpp.includePaths: sourceDirectory
files: [
"main.cpp",
]
Depends { name: "Qt"; submodules: ["core", "xml"] }
Depends { name: "kdsoap" }
Rule {
multiplex: true
Artifact { filePath: "wsdl.cpp"; fileTags: "cpp" }
Artifact { filePath: "wsdl.h"; fileTags: "cpp" }
prepare: {
var file = product.sourceDirectory +
"/wsdl/WsAnnuaire.wsdl";
var cmd = new Command("kdwsdl2cpp", ["-both", "wsdl",
file]);
cmd.description = "generating " + outputs;
cmd.workingDirectory = product.buildDirectory;
return cmd;
}
}
}
Adding the second artifact makes qbs call moc on the wsdl.h and generates
the qt.headers/wsdl.moc file.
But how can I add this file to the link?
Thanks
Raphael
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/qbs/attachments/20190827/8f0f3b44/attachment.html>
More information about the Qbs
mailing list