diff options
-rw-r--r-- | smolbote.qbs | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/smolbote.qbs b/smolbote.qbs index 4544cbe..c0f794b 100644 --- a/smolbote.qbs +++ b/smolbote.qbs @@ -46,7 +46,6 @@ Project { CppApplication { id: poi name: "poi" - property stringList defines: [] Depends { name: "Qt" @@ -64,10 +63,14 @@ Project { cpp.includePaths: ['src', 'src/lib', 'lib'] // global defines cpp.defines: { - if(project.deprecatedWarnings) - defines.push("QT_DEPRECATED_WARNINGS", "QT_DISABLE_DEPRECATED_BEFORE="+project.deprecatedBefore); - return defines; + var defs = []; + if(project.deprecatedWarnings) { + defs.push("QT_DEPRECATED_WARNINGS", "QT_DISABLE_DEPRECATED_BEFORE="+project.deprecatedBefore); + } + + return defs; } + cpp.cxxLanguageVersion: "c++17" cpp.linkerFlags: libconfig.libs @@ -77,13 +80,7 @@ Project { files: [ "src/main.cpp", ] - cpp.defines: { - if(project.deprecatedWarnings) - defines.push("QT_DEPRECATED_WARNINGS", "QT_DISABLE_DEPRECATED_BEFORE="+project.deprecatedBefore); - if(git.found) - defines.push('GIT_VERSION="'+git.version+'"', 'GIT_DESCRIBE="'+git.describe+'"'); - return defines; - } + cpp.defines: outer.concat(["GIT_VERSION=\""+git.version+"\""]) } Group { |