diff options
Diffstat (limited to 'src/bluetooth')
-rw-r--r-- | src/bluetooth/bluetooth.pro | 9 | ||||
-rw-r--r-- | src/bluetooth/configure.json | 71 |
2 files changed, 74 insertions, 6 deletions
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" + ] + } + ] +} |