diff options
author | Oliver Wolff <oliver.wolff@qt.io> | 2017-08-01 09:27:22 +0200 |
---|---|---|
committer | Oliver Wolff <oliver.wolff@qt.io> | 2017-08-30 13:33:08 +0000 |
commit | dbd70341ea47122239ec90304f1d6c66c34a4acd (patch) | |
tree | 4d2825b4aed911f83749167d97e9ed57406942a7 /src/bluetooth/bluetooth.pro | |
parent | c3c3837b02919a26031d917003898e72585e300b (diff) |
Add configure test to detect presence of winrt API
Instead of checking for a certain Windows version, we should check
whether the API is actually available
[ChangeLog][QtBluetooth][Windows] Enabled UWP backend for desktop
Windows versions that support the API
Task-number: QTBUG-61566
Change-Id: I8384119c70cc2c4bdcdbe6b297cfcf5fb3e3f534
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
Diffstat (limited to 'src/bluetooth/bluetooth.pro')
-rw-r--r-- | src/bluetooth/bluetooth.pro | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/src/bluetooth/bluetooth.pro b/src/bluetooth/bluetooth.pro index 233cdb3b..b0e78d39 100644 --- a/src/bluetooth/bluetooth.pro +++ b/src/bluetooth/bluetooth.pro @@ -77,6 +77,11 @@ SOURCES += \ qlowenergycontroller.cpp \ qlowenergyserviceprivate.cpp +win32 { + WINDOWS_SDK_VERSION_STRING = $$(WindowsSDKVersion) + WINDOWS_SDK_VERSION = $$member($$list($$split(WINDOWS_SDK_VERSION_STRING, .)), 2) +} + qtConfig(bluez) { QT_PRIVATE = concurrent QT_FOR_PRIVATE += dbus @@ -188,8 +193,14 @@ qtConfig(bluez) { SOURCES -= qbluetoothdevicediscoveryagent.cpp SOURCES -= qlowenergyservice.cpp SOURCES -= qlowenergycontroller.cpp -} else:winrt { +} else: qtConfig(winrt_bt) { DEFINES += QT_WINRT_BLUETOOTH + !winrt { + SOURCES += qbluetoothutils_win.cpp + DEFINES += CLASSIC_APP_BUILD + LIBS += runtimeobject.lib + } + QT += core-private SOURCES += \ @@ -201,11 +212,9 @@ qtConfig(bluez) { 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) { + lessThan(WINDOWS_SDK_VERSION, 14393) { DEFINES += QT_WINRT_LIMITED_SERVICEDISCOVERY - DEFINES += QT_UCRTVERSION=$$WINRT_SDK_VERSION + DEFINES += QT_UCRTVERSION=$$WINDOWS_SDK_VERSION } } else { message("Unsupported Bluetooth platform, will not build a working QtBluetooth library.") |