diff options
author | Joerg Bornemann <joerg.bornemann@nokia.com> | 2012-02-15 15:56:22 +0100 |
---|---|---|
committer | Oswald Buddenhagen <oswald.buddenhagen@nokia.com> | 2012-02-15 21:57:41 +0100 |
commit | 5672fa8fd3bd6b09125d9e143a7bb277cea2e87f (patch) | |
tree | c945b6ad76bd8c8f6af8b520cf3ce72ef298d4b5 /share/qbs/modules/qbs/common.qbs |
Long live qbs!
Change-Id: I412793e868919a9ac99611616f292e7047f1ebcf
Diffstat (limited to 'share/qbs/modules/qbs/common.qbs')
-rw-r--r-- | share/qbs/modules/qbs/common.qbs | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/share/qbs/modules/qbs/common.qbs b/share/qbs/modules/qbs/common.qbs new file mode 100644 index 000000000..e9e311e93 --- /dev/null +++ b/share/qbs/modules/qbs/common.qbs @@ -0,0 +1,50 @@ +import qbs.base 1.0 +import qbs.fileinfo 1.0 as FileInfo + +Module { + property list<string> references; + property string buildVariant: "debug" + property bool debugInformation: (buildVariant == "debug") + property string optimization: (buildVariant == "debug" ? "none" : "fast") + property string platform: null + property string hostOS: getHostOS() + property string hostArchitecture: getHostDefaultArchitecture() + property string targetOS: null + property string targetName: null + property string toolchain: null + property string architecture: null + property string endianness: null + property string installDir: '.' + + PropertyOptions { + name: "buildVariant" + allowedValues: ['debug', 'release'] + description: "Defines the consistence of your ice cream sandwich" + } + + PropertyOptions { + name: "optimization" + allowedValues: ['none', 'fast', 'small'] + description: "optimization level" + } + + Rule { + inputs: ["install"] + Artifact { + fileTags: ["installed_content"] + fileName: input.modules.qbs.installDir + "/" + input.fileName + } + + prepare: { + var cmd = new JavaScriptCommand(); + cmd.sourceCode = function() { + File.remove(output.fileName); + File.copy(input.fileName, output.fileName); + } + cmd.description = "installing " + FileInfo.fileName(output.fileName); + cmd.highlight = "linker"; + return cmd; + } + + } +} |