From 3897ff83b6848e4169f1641b1132714870f01801 Mon Sep 17 00:00:00 2001 From: Aqua-sama Date: Sun, 19 Mar 2017 17:52:44 +0100 Subject: Updated BUILDING.md mach script can now build tarballs --- smolbote.qbs | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) (limited to 'smolbote.qbs') diff --git a/smolbote.qbs b/smolbote.qbs index 5ad9008..829faaa 100644 --- a/smolbote.qbs +++ b/smolbote.qbs @@ -25,28 +25,43 @@ Project { Probe { id: git - property string version: "1.0.0" - property string describe: "1.0.0-0-00000000" + property string version: "" + property string describe: "" configure: { if(project.gitVersion) { var meta = GitRepo.read(project.sourceDirectory); version = meta.version; describe = meta.describe; + found = true; } - found = true; } } + // global includes cpp.includePaths: ['src', 'src/3rd-party'] + // global defines cpp.defines: { if(project.deprecatedWarnings) defines.push("QT_DEPRECATED_WARNINGS", "QT_DISABLE_DEPRECATED_BEFORE="+project.deprecatedBefore); - if(git.found) - defines.push('VERSION="'+git.version+'"', 'DESCRIBE="'+git.describe+'"'); return defines; } + Depends { name: "Qt"; submodules: ["core", "widgets", "webengine", "webenginewidgets"] } + Group { + name: "main" + files: [ + "src/browser.cpp", + "src/browser.h", + "src/main.cpp" + ] + cpp.defines: { + if(git.found) + defines.push('GIT_VERSION="'+git.version+'"', 'GIT_DESCRIBE="'+git.describe+'"'); + return defines; + } + } + files: [ "data/resources.qrc", "src/blocker/blockermanager.cpp", @@ -59,8 +74,6 @@ Project { "src/blocker/regexp.h", "src/blocker/subscriptiondialog.ui", "src/blocker/subscriptionform.ui", - "src/browser.cpp", - "src/browser.h", "src/forms/bookmarksdialog.cpp", "src/forms/bookmarksdialog.h", "src/forms/bookmarksdialog.ui", @@ -70,7 +83,6 @@ Project { "src/forms/profiledialog.cpp", "src/forms/profiledialog.h", "src/forms/profiledialog.ui", - "src/main.cpp", "src/mainwindow.cpp", "src/mainwindow.h", "src/mainwindow.ui", -- cgit v1.2.1