import qbs import "tools/qbs/GitRepo.js" as GitRepo import qbs.Probes Project { id: project minimumQbsVersion: "1.8.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). property bool deprecatedWarnings: true // The code also fails to compile if you use APIs deprecated before Qt 5.9. property string deprecatedBefore: "0x050900" references: [ "src/lib/bookmarks/bookmarks.qbs", "src/lib/downloads/downloads.qbs", "src/lib/navigation/navigation.qbs", "lib/settings/settings.qbs", "test/test.qbs", ] Probes.PkgConfigProbe { id: libconfig name: "libconfig++" } Probe { id: git property string version: "" property string describe: "" configure: { if(project.gitVersion) { var meta = GitRepo.read(project.sourceDirectory); version = meta.version; describe = meta.describe; found = true; } } } CppApplication { id: poi name: "poi" property stringList defines: [] Depends { name: "Qt" versionAtLeast: "5.9.0" submodules: ["core", "widgets", "webengine", "webenginewidgets"] } Depends { name: "navigation" } Depends { name: "bookmarks" } Depends { name: "downloads" } Depends { name: "settings" } Depends { name: "settingsDialog" } // global includes 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; } cpp.cxxLanguageVersion: "c++17" cpp.linkerFlags: libconfig.libs Group { name: "main" files: [ "src/browser.cpp", "src/browser.h", "src/main.cpp", "src/singleapplication.cpp", "src/singleapplication.h", ] 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; } } Group { name: "Main Window" files: [ "src/mainwindow.cpp", "src/mainwindow.h", "src/mainwindow.ui", "src/forms/aboutdialog.cpp", "src/forms/aboutdialog.h", "src/forms/aboutdialog.ui", "src/webengine/webview.cpp", "src/webengine/webview.h", "src/widgets/loadingbar.cpp", "src/widgets/loadingbar.h", "src/widgets/mainwindowmenubar.cpp", "src/widgets/mainwindowmenubar.h", "src/widgets/webviewtabbar.cpp", "src/widgets/webviewtabbar.h", ] } Group { name: "Request Filter" files: [ "src/filter/filter.cpp", "src/filter/filter.h", "src/webengine/urlinterceptor.cpp", "src/webengine/urlinterceptor.h", ] } Group { name: "Profile" files: [ "src/forms/cookiesform.cpp", "src/forms/cookiesform.h", "src/forms/cookiesform.ui", "src/forms/profilesdialog.cpp", "src/forms/profilesdialog.h", "src/forms/profilesdialog.ui", "src/forms/profileview.cpp", "src/forms/profileview.h", "src/forms/profileview.ui", "src/webengine/webengineprofile.cpp", "src/webengine/webengineprofile.h", ] } files: [ "data/resources.qrc", ] Group { name: "Executable" fileTagsFilter: product.type qbs.install: true qbs.installDir: "bin" } } // CppApplication poi }