From 63a4a755a308be6141202123248abc9ddc131153 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Thu, 22 Jun 2017 17:53:53 -0700 Subject: Warn when not compiling against the matching libdc version Signed-off-by: Dirk Hohndel --- core/btdiscovery.cpp | 5 ++++- core/libdivecomputer.c | 10 ++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) (limited to 'core') diff --git a/core/btdiscovery.cpp b/core/btdiscovery.cpp index 4e22d45f5..c6cb3003a 100644 --- a/core/btdiscovery.cpp +++ b/core/btdiscovery.cpp @@ -94,13 +94,15 @@ BTDiscovery *BTDiscovery::instance() } #if defined(BT_SUPPORT) - +#if defined(SSRF_CUSTOM_IO) extern void addBtUuid(QBluetoothUuid uuid); +#endif extern QHash productList; extern QStringList vendorList; void BTDiscovery::btDeviceDiscovered(const QBluetoothDeviceInfo &device) { +#if defined(SSRF_CUSTOM_IO) btPairedDevice this_d; this_d.address = device.address(); this_d.name = device.name(); @@ -113,6 +115,7 @@ void BTDiscovery::btDeviceDiscovered(const QBluetoothDeviceInfo &device) } btDeviceDiscoveredMain(this_d); +#endif } void BTDiscovery::btDeviceDiscoveredMain(const btPairedDevice &device) diff --git a/core/libdivecomputer.c b/core/libdivecomputer.c index 7f0a459fc..2f0a303e3 100644 --- a/core/libdivecomputer.c +++ b/core/libdivecomputer.c @@ -17,6 +17,16 @@ #include #include "libdivecomputer.h" +#if !defined(SSRF_LIBDC_VERSION) +#pragma message "You are not compiling against the Subsurface branch of libdivecomputer" +#pragma message "While this may still work, you are missing important features of Subsurface" +#pragma message "Please get it from http://github.com/Subsurface-divelog/libdc Subsurface-branch" +#else +#if !defined(SSRF_CUSTOM_IO) +#pragma message "You are compiling against an older version of the Subsurface branch of libdivecomputer" +#pragma message "which doesn't support the new SSRF_CUSTOM_IO model. Please update libdc" +#endif +#endif // // If we have an old libdivecomputer, it doesn't // have the new DC_TANKINFO bits, but just volume -- cgit v1.2.3-70-g09d2