summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--config.tests/bluez/bluez.pro7
-rw-r--r--config.tests/bluez_le/bluez_le.pro7
-rw-r--r--configure.json5
-rw-r--r--qtconnectivity.pro4
-rw-r--r--src/bluetooth/bluetooth.pro9
-rw-r--r--src/bluetooth/configure.json71
-rw-r--r--src/src.pro4
-rw-r--r--src/tools/sdpscanner/sdpscanner.pro4
-rw-r--r--tests/auto/qbluetoothdevicediscoveryagent/qbluetoothdevicediscoveryagent.pro4
-rw-r--r--tests/auto/qbluetoothsocket/qbluetoothsocket.pro6
-rw-r--r--tests/auto/qlowenergycontroller-gattserver/test/test.pro4
11 files changed, 91 insertions, 34 deletions
diff --git a/config.tests/bluez/bluez.pro b/config.tests/bluez/bluez.pro
index bb5fa2dd..28dcadcb 100644
--- a/config.tests/bluez/bluez.pro
+++ b/config.tests/bluez/bluez.pro
@@ -1,8 +1 @@
-TEMPLATE = app
-
-CONFIG += link_pkgconfig
-PKGCONFIG += bluez
-
-TARGET = bluez
-
SOURCES += main.cpp
diff --git a/config.tests/bluez_le/bluez_le.pro b/config.tests/bluez_le/bluez_le.pro
index 27b19a45..28dcadcb 100644
--- a/config.tests/bluez_le/bluez_le.pro
+++ b/config.tests/bluez_le/bluez_le.pro
@@ -1,8 +1 @@
-TEMPLATE = app
-
-CONFIG += link_pkgconfig
-PKGCONFIG += bluez
-
-TARGET = bluez_le
-
SOURCES += main.cpp
diff --git a/configure.json b/configure.json
new file mode 100644
index 00000000..e63e6f2a
--- /dev/null
+++ b/configure.json
@@ -0,0 +1,5 @@
+{
+ "subconfigs": [
+ "src/bluetooth"
+ ]
+}
diff --git a/qtconnectivity.pro b/qtconnectivity.pro
index b74830b8..dc0f77e3 100644
--- a/qtconnectivity.pro
+++ b/qtconnectivity.pro
@@ -1,7 +1,3 @@
requires(!android|qtHaveModule(androidextras))
-load(configure)
-qtCompileTest(bluez)
-qtCompileTest(bluez_le)
-qtCompileTest(linux_crypto_api)
load(qt_parts)
diff --git a/src/bluetooth/bluetooth.pro b/src/bluetooth/bluetooth.pro
index 63e9ec11..bf2dce74 100644
--- a/src/bluetooth/bluetooth.pro
+++ b/src/bluetooth/bluetooth.pro
@@ -78,7 +78,7 @@ SOURCES += \
qlowenergycontroller.cpp \
qlowenergyserviceprivate.cpp
-config_bluez:qtHaveModule(dbus) {
+qtConfig(bluez):qtHaveModule(dbus) {
QT_FOR_PRIVATE += dbus
DEFINES += QT_BLUEZ_BLUETOOTH
@@ -98,16 +98,13 @@ config_bluez:qtHaveModule(dbus) {
# old versions of Bluez do not have the required BTLE symbols
- config_bluez_le {
+ qtConfig(bluez_le) {
SOURCES += \
qleadvertiser_bluez.cpp \
qlowenergycontroller_bluez.cpp \
lecmaccalculator.cpp
- config_linux_crypto_api:DEFINES += CONFIG_LINUX_CRYPTO_API
- else:message("Linux crypto API not present, signed writes will not work.")
+ qtConfig(linux_crypto_api): DEFINES += CONFIG_LINUX_CRYPTO_API
} else {
- message("Bluez version is too old to support Bluetooth Low Energy.")
- message("Only classic Bluetooth will be available.")
DEFINES += QT_BLUEZ_NO_BTLE
include(dummy/dummy.pri)
SOURCES += \
diff --git a/src/bluetooth/configure.json b/src/bluetooth/configure.json
new file mode 100644
index 00000000..1cf43f36
--- /dev/null
+++ b/src/bluetooth/configure.json
@@ -0,0 +1,71 @@
+{
+ "module": "bluetooth",
+ "testDir": "../../config.tests",
+
+ "libraries": {
+ "bluez": {
+ "label": "BlueZ",
+ "test": "bluez",
+ "sources": [
+ { "type": "pkgConfig", "args": "bluez" },
+ "-lbluetooth"
+ ]
+ }
+ },
+
+ "tests": {
+ "bluez_le": {
+ "label": "BlueZ Low Energy",
+ "type": "compile",
+ "test": "bluez_le"
+ },
+ "linux_crypto_api": {
+ "label": "Linux Crypto API",
+ "type": "compile",
+ "test": "linux_crypto_api"
+ }
+ },
+
+ "features": {
+ "bluez": {
+ "label": "BlueZ",
+ "condition": "libs.bluez",
+ "output": [ "privateFeature" ]
+ },
+ "bluez_le": {
+ "label": "BlueZ Low Energy",
+ "condition": "features.bluez && tests.bluez_le",
+ "output": [ "privateFeature" ]
+ },
+ "linux_crypto_api": {
+ "label": "Linux Crypto API",
+ "condition": "features.bluez_le && tests.linux_crypto_api",
+ "output": [ "privateFeature" ]
+ }
+ },
+
+ "report": [
+ {
+ "type": "note",
+ "condition": "features.bluez_le && !features.linux_crypto_api",
+ "message": "Linux crypto API not present. BTLE signed writes will not work."
+ },
+ {
+ "type": "note",
+ "condition": "features.bluez && !features.bluez_le",
+ "message": "Bluez version is too old to support Bluetooth Low Energy.
+Only classic Bluetooth will be available."
+ }
+ ],
+
+ "summary": [
+ {
+ "section": "Qt Bluetooth",
+ "entries": [
+ "bluez",
+ "bluez_le",
+ "linux_crypto_api"
+ ]
+ }
+ ]
+}
diff --git a/src/src.pro b/src/src.pro
index 97b32522..8c54e4fb 100644
--- a/src/src.pro
+++ b/src/src.pro
@@ -21,6 +21,8 @@ qtHaveModule(quick) {
SUBDIRS += imports
}
-config_bluez:qtHaveModule(dbus) {
+include($$OUT_PWD/bluetooth/qtbluetooth-config.pri)
+QT_FOR_CONFIG += bluetooth-private
+qtConfig(bluez):qtHaveModule(dbus) {
SUBDIRS += tools/sdpscanner
}
diff --git a/src/tools/sdpscanner/sdpscanner.pro b/src/tools/sdpscanner/sdpscanner.pro
index e4773cae..78610ebd 100644
--- a/src/tools/sdpscanner/sdpscanner.pro
+++ b/src/tools/sdpscanner/sdpscanner.pro
@@ -5,8 +5,8 @@ QT = core
SOURCES = main.cpp
-CONFIG += link_pkgconfig
-PKGCONFIG_PRIVATE += bluez
+QT_FOR_CONFIG += bluetooth-private
+QMAKE_USE += bluez
load(qt_tool)
diff --git a/tests/auto/qbluetoothdevicediscoveryagent/qbluetoothdevicediscoveryagent.pro b/tests/auto/qbluetoothdevicediscoveryagent/qbluetoothdevicediscoveryagent.pro
index e012ae52..96880930 100644
--- a/tests/auto/qbluetoothdevicediscoveryagent/qbluetoothdevicediscoveryagent.pro
+++ b/tests/auto/qbluetoothdevicediscoveryagent/qbluetoothdevicediscoveryagent.pro
@@ -2,9 +2,9 @@ SOURCES += tst_qbluetoothdevicediscoveryagent.cpp
TARGET=tst_qbluetoothdevicediscoveryagent
CONFIG += testcase
-QT = core concurrent bluetooth testlib
+QT = core concurrent bluetooth-private testlib
osx:QT += widgets
-config_bluez:qtHaveModule(dbus) {
+qtConfig(bluez):qtHaveModule(dbus) {
DEFINES += QT_BLUEZ_BLUETOOTH
}
diff --git a/tests/auto/qbluetoothsocket/qbluetoothsocket.pro b/tests/auto/qbluetoothsocket/qbluetoothsocket.pro
index 641ff6c7..8c9b2acb 100644
--- a/tests/auto/qbluetoothsocket/qbluetoothsocket.pro
+++ b/tests/auto/qbluetoothsocket/qbluetoothsocket.pro
@@ -3,7 +3,7 @@ TARGET = tst_qbluetoothsocket
CONFIG += testcase
testcase.timeout = 250 # this test is slow
-QT = core concurrent network bluetooth testlib
+QT = core concurrent network bluetooth-private testlib
osx:QT += widgets
OTHER_FILES += \
@@ -11,8 +11,8 @@ OTHER_FILES += \
osx {
DEFINES += QT_OSX_BLUETOOTH
-} else:android {
+} else: android {
DEFINES += QT_ANDROID_BLUETOOTH
-} config_bluez:qtHaveModule(dbus) {
+} else: qtConfig(bluez):qtHaveModule(dbus) {
DEFINES += QT_BLUEZ_BLUETOOTH
}
diff --git a/tests/auto/qlowenergycontroller-gattserver/test/test.pro b/tests/auto/qlowenergycontroller-gattserver/test/test.pro
index 45cff660..fc9c7a18 100644
--- a/tests/auto/qlowenergycontroller-gattserver/test/test.pro
+++ b/tests/auto/qlowenergycontroller-gattserver/test/test.pro
@@ -3,7 +3,7 @@ QT = core bluetooth bluetooth-private testlib
TARGET = tst_qlowenergycontroller-gattserver
CONFIG += testcase c++11
-config_linux_crypto_api:DEFINES += CONFIG_LINUX_CRYPTO_API
-config_bluez_le:DEFINES += CONFIG_BLUEZ_LE
+qtConfig(linux_crypto_api): DEFINES += CONFIG_LINUX_CRYPTO_API
+qtConfig(bluez_le): DEFINES += CONFIG_BLUEZ_LE
SOURCES += tst_qlowenergycontroller-gattserver.cpp