Created
September 7, 2015 08:32
-
-
Save orgads/ea7b2b463119a5e36a06 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import qbs | |
import qbs.FileInfo | |
StaticLibrary { | |
name: "Params" | |
Depends { name: "cpp" } | |
Group { | |
files: [ | |
"ExcelGenerators/**/*.csv", | |
project.tp + "/ExcelGenerators/**/*.csv", | |
] | |
fileTags: ["csv"] | |
} | |
Rule { | |
id: params | |
inputs: ["csv"] | |
multiplex: true | |
outputFileTags: ["hpp", "cpp"] | |
outputArtifacts: { | |
var artifacts = [] | |
inputs.csv.map(function (input) { | |
artifacts.push({fileTags: "hpp", filePath: input.baseName + ".h"}); | |
artifacts.push({fileTags: "cpp", filePath: input.baseName + ".cpp"}); | |
}); | |
return artifacts | |
} | |
prepare: { | |
var cmd; | |
if (qbs.hostOS.contains("windows")) { | |
cmd = new Command("Utils/csvgen.bat", "D:/ISIPPC-new", product.buildDirectory) | |
} else { | |
cmd = new Command("Utils/csvgen-linux.sh", product.buildDirectory) | |
} | |
cmd.description = 'generating params'; | |
cmd.highlight = 'compiler'; | |
return cmd; | |
} | |
} | |
Export { | |
Depends { name: "cpp" } | |
cpp.includePaths: FileInfo.joinPaths(product.buildDirectory, "TPApp/ParameterHandler/Include") | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment