summaryrefslogtreecommitdiffstats
path: root/src/bluetooth/bluetooth.pro
diff options
context:
space:
mode:
Diffstat (limited to 'src/bluetooth/bluetooth.pro')
-rw-r--r--src/bluetooth/bluetooth.pro95
1 files changed, 68 insertions, 27 deletions
diff --git a/src/bluetooth/bluetooth.pro b/src/bluetooth/bluetooth.pro
index 65ed3a04..3f0c5604 100644
--- a/src/bluetooth/bluetooth.pro
+++ b/src/bluetooth/bluetooth.pro
@@ -1,13 +1,10 @@
TARGET = QtBluetooth
-QT = core
-QT_PRIVATE = concurrent
+QT = core core-private
QMAKE_DOCS = $$PWD/doc/qtbluetooth.qdocconf
OTHER_FILES += doc/src/*.qdoc # show .qdoc files in Qt Creator
-load(qt_module)
-
PUBLIC_HEADERS += \
qbluetoothglobal.h \
qbluetoothaddress.h\
@@ -24,9 +21,15 @@ PUBLIC_HEADERS += \
qbluetoothtransfermanager.h \
qbluetoothtransferrequest.h \
qlowenergyservice.h \
+ qlowenergyservicedata.h \
qlowenergycharacteristic.h \
+ qlowenergycharacteristicdata.h \
qlowenergydescriptor.h \
+ qlowenergydescriptordata.h \
qbluetoothtransferreply.h \
+ qlowenergyadvertisingdata.h \
+ qlowenergyadvertisingparameters.h \
+ qlowenergyconnectionparameters.h \
qlowenergycontroller.h
PRIVATE_HEADERS += \
@@ -43,7 +46,9 @@ PRIVATE_HEADERS += \
qprivatelinearbuffer_p.h \
qbluetoothlocaldevice_p.h \
qlowenergycontroller_p.h \
- qlowenergyserviceprivate_p.h
+ qlowenergyserviceprivate_p.h \
+ qleadvertiser_p.h \
+ lecmaccalculator_p.h
SOURCES += \
qbluetoothaddress.cpp\
@@ -60,15 +65,21 @@ SOURCES += \
qbluetoothtransfermanager.cpp \
qbluetoothtransferrequest.cpp \
qbluetoothtransferreply.cpp \
+ qlowenergyadvertisingdata.cpp \
+ qlowenergyadvertisingparameters.cpp \
+ qlowenergyconnectionparameters.cpp \
qlowenergyservice.cpp \
+ qlowenergyservicedata.cpp \
qlowenergycharacteristic.cpp \
+ qlowenergycharacteristicdata.cpp \
qlowenergydescriptor.cpp \
+ qlowenergydescriptordata.cpp \
qlowenergycontroller.cpp \
qlowenergyserviceprivate.cpp
-config_bluez:qtHaveModule(dbus) {
- QT *= dbus
- DEFINES += QT_BLUEZ_BLUETOOTH
+qtConfig(bluez) {
+ QT_PRIVATE = concurrent
+ QT_FOR_PRIVATE += dbus
include(bluez/bluez.pri)
@@ -86,25 +97,28 @@ config_bluez:qtHaveModule(dbus) {
# old versions of Bluez do not have the required BTLE symbols
- config_bluez_le {
+ qtConfig(bluez_le) {
SOURCES += \
- qlowenergycontroller_bluez.cpp
+ qleadvertiser_bluez.cpp \
+ qlowenergycontroller_bluez.cpp \
+ lecmaccalculator.cpp
+ 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 += \
qlowenergycontroller_p.cpp
}
-} else:android:!android-no-sdk {
+} else:android:!android-embedded {
include(android/android.pri)
DEFINES += QT_ANDROID_BLUETOOTH
- QT += core-private androidextras
+ QT_FOR_PRIVATE += core-private androidextras
ANDROID_PERMISSIONS = \
android.permission.BLUETOOTH \
- android.permission.BLUETOOTH_ADMIN
+ android.permission.BLUETOOTH_ADMIN \
+ android.permission.ACCESS_COARSE_LOCATION # since Android 6.0 (API lvl 23)
ANDROID_BUNDLED_JAR_DEPENDENCIES = \
jar/QtAndroidBluetooth-bundled.jar:org.qtproject.qt5.android.bluetooth.QtBluetoothBroadcastReceiver
ANDROID_JAR_DEPENDENCIES = \
@@ -120,8 +134,9 @@ config_bluez:qtHaveModule(dbus) {
qlowenergycontroller_android.cpp
} else:osx {
+ QT_PRIVATE = concurrent
DEFINES += QT_OSX_BLUETOOTH
- LIBS += -framework Foundation -framework IOBluetooth
+ LIBS_PRIVATE += -framework Foundation -framework IOBluetooth
include(osx/osxbt.pri)
OBJECTIVE_SOURCES += \
@@ -135,14 +150,10 @@ config_bluez:qtHaveModule(dbus) {
qlowenergycontroller_osx.mm \
qlowenergyservice_osx.mm
- SOURCES += \
- qlowenergycontroller_p.cpp
-
PRIVATE_HEADERS += qbluetoothsocket_osx_p.h \
qbluetoothserver_osx_p.h \
qbluetoothtransferreply_osx_p.h \
qbluetoothtransferreply_osx_p.h \
- qbluetoothdevicediscoverytimer_osx_p.h \
qlowenergycontroller_osx_p.h
SOURCES -= qbluetoothdevicediscoveryagent.cpp
@@ -154,9 +165,9 @@ config_bluez:qtHaveModule(dbus) {
SOURCES -= qlowenergyservice.cpp
SOURCES -= qlowenergycontroller.cpp
SOURCES -= qlowenergycontroller_p.cpp
-} else:ios {
+} else:ios|tvos {
DEFINES += QT_IOS_BLUETOOTH
- LIBS += -framework Foundation -framework CoreBluetooth
+ LIBS_PRIVATE += -framework Foundation -framework CoreBluetooth
OBJECTIVE_SOURCES += \
qbluetoothdevicediscoveryagent_ios.mm \
@@ -164,12 +175,10 @@ config_bluez:qtHaveModule(dbus) {
qlowenergyservice_osx.mm
PRIVATE_HEADERS += \
- qlowenergycontroller_osx_p.h \
- qbluetoothdevicediscoverytimer_osx_p.h
+ qlowenergycontroller_osx_p.h
include(osx/osxbt.pri)
SOURCES += \
- qbluetoothdevicediscoveryagent_p.cpp \
qbluetoothlocaldevice_p.cpp \
qbluetoothserviceinfo_p.cpp \
qbluetoothservicediscoveryagent_p.cpp \
@@ -181,12 +190,35 @@ config_bluez:qtHaveModule(dbus) {
SOURCES -= qlowenergycontroller_p.cpp
SOURCES -= qlowenergyservice.cpp
SOURCES -= qlowenergycontroller.cpp
-} else:win32:!winrt:!wince {
+} else:winrt {
+ DEFINES += QT_WINRT_BLUETOOTH
+ QT += core-private
+
+ SOURCES += \
+ qbluetoothdevicediscoveryagent_winrt.cpp \
+ qbluetoothlocaldevice_p.cpp \
+ qbluetoothserver_winrt.cpp \
+ qbluetoothservicediscoveryagent_winrt.cpp \
+ qbluetoothserviceinfo_winrt.cpp \
+ qbluetoothsocket_winrt.cpp \
+ qlowenergycontroller_winrt.cpp
+
+ WINRT_SDK_VERSION_STRING = $$(UCRTVersion)
+ WINRT_SDK_VERSION = $$member($$list($$split(WINRT_SDK_VERSION_STRING, .)), 2)
+ lessThan(WINRT_SDK_VERSION, 14393) {
+ DEFINES += QT_WINRT_LIMITED_SERVICEDISCOVERY
+ DEFINES += QT_UCRTVERSION=$$WINRT_SDK_VERSION
+ }
+} else:win32 {
+ QT_PRIVATE = concurrent
DEFINES += QT_WIN_BLUETOOTH
LIBS += -lbthprops -lws2_32 -lsetupapi
include(windows/windows.pri)
+ # remove dummy warning once platform port is complete
+ include(dummy/dummy.pri)
+
SOURCES += \
qbluetoothdevicediscoveryagent_win.cpp \
qbluetoothlocaldevice_win.cpp \
@@ -195,9 +227,11 @@ config_bluez:qtHaveModule(dbus) {
qbluetoothsocket_win.cpp \
qbluetoothserver_win.cpp \
qlowenergycontroller_win.cpp
+
} else {
message("Unsupported Bluetooth platform, will not build a working QtBluetooth library.")
- message("Either no Qt D-Bus found or no BlueZ headers.")
+ message("Either no Qt D-Bus found or no BlueZ headers available.")
+ include(dummy/dummy.pri)
SOURCES += \
qbluetoothdevicediscoveryagent_p.cpp \
qbluetoothlocaldevice_p.cpp \
@@ -208,7 +242,14 @@ config_bluez:qtHaveModule(dbus) {
qlowenergycontroller_p.cpp
}
+winrt-*-msvc2015 {
+ MODULE_WINRT_CAPABILITIES_DEVICE += \
+ bluetooth.genericAttributeProfile \
+ bluetooth.rfcomm
+}
+
OTHER_FILES +=
HEADERS += $$PUBLIC_HEADERS $$PRIVATE_HEADERS
+load(qt_module)