diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2017-12-05 11:47:34 -0800 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2017-12-05 19:29:59 -0800 |
commit | 5be38b2b14af93e9e5880605fee62ab11d3b16fa (patch) | |
tree | 03bd4dd3c2f8cb4d0dba26e8f1113dfdb67223f5 /CMakeLists.txt | |
parent | 4816ca43bb00f1252f351e35f2d94603d9f63dfe (diff) | |
download | subsurface-5be38b2b14af93e9e5880605fee62ab11d3b16fa.tar.gz |
cmake: building Subsurface-mobile without BT is no longer supported
It just doesn't seem to make sense. Why would you do that.
Allowing this options makes things more complicated as we need to
test for that in various places.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 1773d12fd..5827304c1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -161,6 +161,8 @@ elseif(${SUBSURFACE_TARGET_EXECUTABLE} MATCHES "MobileExecutable") list(APPEND QT_EXTRA_LIBRARIES Qt5::Quick) list(APPEND QT_EXTRA_LIBRARIES Qt5::QuickControls2) add_definitions(-DSUBSURFACE_MOBILE) + message(STATUS "Building Subsurface-mobile requires BT support") + set(BTSUPPORT ON) endif() if(ANDROID) @@ -218,7 +220,10 @@ set(QT_LIBRARIES Qt5::Core Qt5::Concurrent Qt5::Widgets Qt5::Network Qt5::Svg Q set(QT_TEST_LIBRARIES ${QT_LIBRARIES} Qt5::Test) #disable bluetooth if Qt version is ancient. -if (BTSUPPORT AND "${Qt5Core_VERSION}" VERSION_LESS 5.4.0) +if (BTSUPPORT AND Qt5Widgets_VERSION VERSION_LESS 5.4.0) + if (${SUBSURFACE_TARGET_EXECUTABLE} MATCHES "MobileExecutable") + message(FATAL_ERROR "Subsurface-mobile requires BT and Qt version ${Qt5Widgets_VERSION} is too old for that") + endif() set(BTSUPPORT OFF) message(STATUS "Turning off Bluetooth support as Qt version ${Qt5Core_VERSION} is insufficient for that") list(REMOVE_ITEM QT_LIBRARIES Qt5::Bluetooth) |