diff --git a/.travis.yml b/.travis.yml index cb80aac..0a0f543 100644 --- a/.travis.yml +++ b/.travis.yml @@ -24,6 +24,7 @@ jobs: include: # Qst application for Linux - stage: build + name: Build Qst application (linux_amd64) sudo: required services: - docker @@ -35,7 +36,7 @@ jobs: - TARGET=qst - PLATFORM=linux-x86_64 - QBS_PROFILE=qt5 - - QBS_OPTIONS="project.runAutotest:true project.version:$QST_VERSION" + - QBS_OPTIONS="modules.qstbuildconfig.runAutotest:true project.version:$QST_VERSION" script: - docker-compose run --rm linux qbs install --install-root qst @@ -46,6 +47,7 @@ jobs: - find qst/ # Qst application for Windows - stage: build + name: Build Qst application (mingw-w64) sudo: required services: - docker @@ -68,6 +70,7 @@ jobs: - find qst/ # Launchpad probe for CC13x0 - stage: build + name: Build Launchpad probe sudo: required services: - docker @@ -91,6 +94,7 @@ jobs: - find qst/ # Deploy linux bundle - stage: bundle and deploy + name: Bundle and deploy for Linux sudo: false env: - TARGET="linux-x86_64 bundle" @@ -113,6 +117,7 @@ jobs: all_branches: true # Deploy windows bundle - stage: bundle and deploy + name: Bundle and deploy for Windows sudo: false env: - TARGET="windows-x86_64 bundle" diff --git a/dist/distribute.qbs b/dist/distribute.qbs index 65727d8..f527e2b 100644 --- a/dist/distribute.qbs +++ b/dist/distribute.qbs @@ -11,6 +11,7 @@ Product { Depends { name: "cpp" } Depends { name: "Qt.core" } Depends { name: "Qt.qml" } + Depends { name: "qstbuildconfig" } Group { name: "Qt QML files" diff --git a/qbs/imports/QstAutoTest.qbs b/qbs/imports/QstAutoTest.qbs index 189b66d..19df0a9 100644 --- a/qbs/imports/QstAutoTest.qbs +++ b/qbs/imports/QstAutoTest.qbs @@ -3,7 +3,7 @@ import qbs QtApplication { type: [ "application", "autotest" ] - condition : { return qbs.architecture.startsWith("x86") } + condition : qbs.architecture.startsWith("x86") property string dataDirectory: sourceDirectory @@ -11,6 +11,7 @@ QtApplication { Depends { name : "Qt.testlib" } Depends { name: "qsttestlib" } + Depends { name: "qstbuildconfig" } cpp.defines: base.concat([ 'SOURCE_DIR="' + dataDirectory + '"' @@ -19,8 +20,8 @@ QtApplication { consoleApplication: true Group { - fileTagsFilter: product.type - qbs.install: project.installTests + fileTagsFilter: "application" + qbs.install: qstbuildconfig.installTests qbs.installDir : "bin" } } diff --git a/qbs/modules/qstbuildconfig/common.qbs b/qbs/modules/qstbuildconfig/common.qbs new file mode 100644 index 0000000..1258fb6 --- /dev/null +++ b/qbs/modules/qstbuildconfig/common.qbs @@ -0,0 +1,9 @@ +import qbs + +Module { + name: "qbsbuildconfig" + property bool runAutotest: false + property bool installTests: false + + qbs.installPrefix: "" +} diff --git a/qst-project.qbs b/qst-project.qbs index 789a7c0..89e911f 100644 --- a/qst-project.qbs +++ b/qst-project.qbs @@ -20,8 +20,6 @@ Project { minimumQbsVersion: "1.6" - property bool runAutotest: false - property bool installTests: false property string commit: Environment.getEnv("QST_COMMIT") || "unspecified" property string version: Environment.getEnv("QST_VERSION") || "local-build" } diff --git a/share/share.qbs b/share/share.qbs index 888c361..a886be9 100644 --- a/share/share.qbs +++ b/share/share.qbs @@ -10,6 +10,8 @@ Product { sourceDirectory + "/share/qst/imports", ] + Depends { name: "qstbuildconfig" } + Group { name : "qst imports" prefix : "qst/imports/qst/" diff --git a/src/launchpad-probe/launchpad-probe.qbs b/src/launchpad-probe/launchpad-probe.qbs index 058d995..ede9a12 100644 --- a/src/launchpad-probe/launchpad-probe.qbs +++ b/src/launchpad-probe/launchpad-probe.qbs @@ -11,6 +11,7 @@ Project { Depends { name: "simplelink"; submodules: [ "core", "drivers", "tirtos", "board" ] } Depends { name: "shared-types" } + Depends { name: "qstbuildconfig" } simplelink.core.device: "cc1310f128" simplelink.board.type: "CC1310_LAUNCHXL" diff --git a/src/qst/qst.qbs b/src/qst/qst.qbs index 50dba14..05287d0 100644 --- a/src/qst/qst.qbs +++ b/src/qst/qst.qbs @@ -5,15 +5,23 @@ QtApplication { condition : qbs.architecture.startsWith("x86") - Depends { name : "Qt.qml"; } - Depends { name : "Qt.serialport"; } + Depends { + name : "Qt"; + submodules: [ + "core", + "network", + "qml", + "qml-private", + "serialport" + ] + } Depends { name : "cpp" } - Depends { name : "Qt.qml-private"; } Depends { name : "shared-types" } + Depends { name: "qstbuildconfig" } cpp.cxxLanguageVersion : "c++14" cpp.rpaths: [ - "$ORIGIN/../lib/" + cpp.rpathOrigin + "/../lib/" ] cpp.defines: [ "QST_COMMIT=" + project.commit, @@ -112,7 +120,7 @@ QtApplication { ] Group { - fileTagsFilter: product.type + fileTagsFilter: "application" qbs.install: true qbs.installDir : "bin" } diff --git a/tests/tests.qbs b/tests/tests.qbs index 68554f1..c36c60a 100644 --- a/tests/tests.qbs +++ b/tests/tests.qbs @@ -35,9 +35,10 @@ Project { } AutotestRunner { - condition : { return qbs.architecture.startsWith("x86") } + condition : qbs.architecture.startsWith("x86") - builtByDefault: project.runAutotest + Depends { name: "qstbuildconfig" } + builtByDefault: qstbuildconfig.runAutotest } }