diff options
Diffstat (limited to 'smolbote.qbs')
-rw-r--r-- | smolbote.qbs | 104 |
1 files changed, 104 insertions, 0 deletions
diff --git a/smolbote.qbs b/smolbote.qbs new file mode 100644 index 0000000..1ef8407 --- /dev/null +++ b/smolbote.qbs @@ -0,0 +1,104 @@ +import qbs +import "qbs/GitRepo.js" as GitRepo + +Project { + id: project + // Qt 5.7 has qbs version 1.6.0 + // Qt 5.8 has qbs version 1.7.0 + minimumQbsVersion: "1.6.0" + + property bool gitVersion: true + + // The following define makes your compiler emit warnings if you use any + // feature of Qt which as been marked as deprecated (the exact warnings + // depend on your compiler). Please consult the documentation of the + // deprecated API in order to know how to port your code away from it. + + // The code also fails to compile if you use APIs deprecated before Qt 5,7. + property bool deprecatedWarnings: true + + CppApplication { + id: poi + name: "poi" + property stringList defines: [] + + Probe { + id: git + property string version: "1.0.0" + property string describe: "1.0.0-0-00000000" + configure: { + if(project.gitVersion) { + var meta = GitRepo.read(project.sourceDirectory); + version = meta.version; + describe = meta.describe; + } + found = true; + } + } + + cpp.includePaths: ['src'] + cpp.defines: { + if(project.deprecatedWarnings) + defines.push("QT_DEPRECATED_WARNINGS", "QT_DISABLE_DEPRECATED_BEFORE=0x050700"); + if(git.found) + defines.push('VERSION="'+git.version+'"'); + return defines; + } + + files: [ + "data/icon.svg", + "data/resources.qrc", + "src/browser.cpp", + "src/browser.h", + "src/forms/blockerdialog.cpp", + "src/forms/blockerdialog.h", + "src/forms/blockerdialog.ui", + "src/forms/bookmarksdialog.cpp", + "src/forms/bookmarksdialog.h", + "src/forms/bookmarksdialog.ui", + "src/forms/downloaddialog.cpp", + "src/forms/downloaddialog.h", + "src/forms/downloaddialog.ui", + "src/forms/profiledialog.cpp", + "src/forms/profiledialog.h", + "src/forms/profiledialog.ui", + "src/main.cpp", + "src/mainwindow.cpp", + "src/mainwindow.h", + "src/mainwindow.ui", + "src/settings.cpp", + "src/settings.h", + "src/webengine/blockerrule.cpp", + "src/webengine/blockerrule.h", + "src/webengine/blockersubscription.cpp", + "src/webengine/blockersubscription.h", + "src/webengine/downloaditemform.cpp", + "src/webengine/downloaditemform.h", + "src/webengine/downloaditemform.ui", + "src/webengine/regexp.cpp", + "src/webengine/regexp.h", + "src/webengine/urlinterceptor.cpp", + "src/webengine/urlinterceptor.h", + "src/webengine/webengineprofile.cpp", + "src/webengine/webengineprofile.h", + "src/webengine/webview.cpp", + "src/webengine/webview.h", + "src/widgets/loadingbar.cpp", + "src/widgets/loadingbar.h", + "src/widgets/urllineedit.cpp", + "src/widgets/urllineedit.h", + "src/widgets/webviewtabbar.cpp", + "src/widgets/webviewtabbar.h", + "src/xbel/xbel.cpp", + "src/xbel/xbel.h", + ] + + Depends { name: "Qt"; submodules: ["core", "widgets", "webengine", "webenginewidgets"] } + + // Properties for the produced executable + Group { + fileTagsFilter: product.type // filter selects produced executable + qbs.install: true // install it + } + } +} |