Skycoder42
6 years ago
4 changed files with 47 additions and 3 deletions
@ -0,0 +1,42 @@ |
|||
import qbs |
|||
import qbs.FileInfo |
|||
|
|||
Module { |
|||
Depends { name: "Qt.mvvmcore" } |
|||
|
|||
property string qsettingsgeneratorName: "qsettingsgenerator" |
|||
|
|||
version: Qt.mvvmcore.version |
|||
|
|||
FileTagger { |
|||
fileTags: ["settings-xml"] |
|||
patterns: ["*.settings.xml"] |
|||
} |
|||
|
|||
Rule { |
|||
inputs: ["settings-xml"] |
|||
|
|||
Artifact { |
|||
filePath: input.baseName + ".h" |
|||
fileTags: ["hpp"] |
|||
} |
|||
Artifact { |
|||
filePath: input.baseName + ".cpp" |
|||
fileTags: ["cpp"] |
|||
} |
|||
|
|||
prepare: { |
|||
var cmd = new Command(); |
|||
cmd.description = "generating settings class" + input.fileName; |
|||
cmd.highlight = "codegen"; |
|||
cmd.program = FileInfo.joinPaths(product.moduleProperty("Qt.core", "binPath"), |
|||
product.moduleProperty("Qt.restbuilder", "qsettingsgeneratorName")); |
|||
cmd.arguments = [ |
|||
"--in", input.filePath, |
|||
"--header", outputs["hpp"][0].filePath, |
|||
"--impl", outputs["cpp"][0].filePath |
|||
]; |
|||
return cmd; |
|||
} |
|||
} |
|||
} |
Loading…
Reference in new issue