import qbs import "tools/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. property bool deprecatedWarnings: true // The code also fails to compile if you use APIs deprecated before Qt 5.7. property string deprecatedBefore: "0x050700" CppApplication { id: poi name: "poi" property stringList defines: [] 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; } } } // enable clazy if using clang Properties { condition: cpp.compilerName.contains("clang") cpp.cxxFlags: ["-Xclang", "-load", "-Xclang", "ClangLazy.so", "-Xclang", "-add-plugin", "-Xclang", "clang-lazy"] } // 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); 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(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/widgets/dockingwidget.cpp", "src/widgets/dockingwidget.h", "src/widgets/loadingbar.cpp", "src/widgets/loadingbar.h", "src/widgets/mainwindowmenubar.cpp", "src/widgets/mainwindowmenubar.h", "src/widgets/urllineedit.cpp", "src/widgets/urllineedit.h", "src/widgets/webviewtabbar.cpp", "src/widgets/webviewtabbar.h", ] } Group { name: "bookmarks" files: [ "src/forms/bookmarksform.ui", "src/forms/bookmarkswidget.cpp", "src/forms/bookmarkswidget.h", "src/xbel.cpp", "src/xbel.h", ] } Group { name: "downloads" files: [ "src/forms/downloadsform.ui", "src/forms/downloadswidget.cpp", "src/forms/downloadswidget.h", "src/widgets/downloaditemform.ui", "src/widgets/downloaditemwidget.cpp", "src/widgets/downloaditemwidget.h", ] } Group { name: "Request Filter" files: [ "src/filter/blockermanager.cpp", "src/filter/blockermanager.h", "src/filter/filter.cpp", "src/filter/filter.h", "src/filter/filtercollection.cpp", "src/filter/filtercollection.h", "src/filter/filtertree.cpp", "src/filter/filtertree.h", "src/filter/regexp.cpp", "src/filter/regexp.h", "src/filter/subscriptiondialog.ui", "src/filter/subscriptionform.ui", "src/webengine/urlinterceptor.cpp", "src/webengine/urlinterceptor.h", ] cpp.defines: { if(project.deprecatedWarnings) defines.push("QT_DEPRECATED_WARNINGS", "QT_DISABLE_DEPRECATED_BEFORE="+project.deprecatedBefore); defines.push("DEBUG_VERBOSE") return defines; } } Group { name: "Profile" files: [ "src/forms/cookiesform.cpp", "src/forms/cookiesform.h", "src/forms/cookiesform.ui", "src/forms/profiledialog.cpp", "src/forms/profiledialog.h", "src/forms/profiledialog.ui", "src/forms/profilesdialog.cpp", "src/forms/profilesdialog.h", "src/forms/profilesdialog.ui", "src/webengine/webengineprofile.cpp", "src/webengine/webengineprofile.h", ] } files: [ "data/resources.qrc", "src/settings.cpp", "src/settings.h", "src/webengine/webview.cpp", "src/webengine/webview.h", ] Group { name: "Executable" fileTagsFilter: product.type qbs.install: true qbs.installDir: "bin" } Group { name: "Configuration" files: [ "data/poi.toml", ] qbs.install: true qbs.installDir: "share/smolbote" } } }