aboutsummaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2020-04-24 15:19:04 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2020-04-25 13:18:41 -0700
commit0fe02af0e8ce976eaca9225d19b501f627723bd9 (patch)
treeeb01afa3817ad16a5880bf2a665a2545294da9e7 /CMakeLists.txt
parentd3e495efd006abe5af03e396499bfcf60135a3e2 (diff)
downloadsubsurface-0fe02af0e8ce976eaca9225d19b501f627723bd9.tar.gz
build-system/android: remove libusb at QTest
We no longer use libusb to access USB devices on Android, therefore there's no point including libusb in our build. Also, we have never even attempted to run the tests on Android, so let's not even pretend to support building them. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt16
1 files changed, 13 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 7ea1ab212..3faf72c63 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -152,7 +152,10 @@ else()
pkg_config_library(LIBXSLT libxslt REQUIRED)
endif()
pkg_config_library(LIBZIP libzip REQUIRED)
-pkg_config_library(LIBUSB libusb-1.0 QUIET)
+
+if(NOT ANDROID)
+ pkg_config_library(LIBUSB libusb-1.0 QUIET)
+endif()
include_directories(.
${CMAKE_CURRENT_BINARY_DIR}
@@ -190,6 +193,7 @@ endif()
if(ANDROID)
set(NO_PRINTING ON)
set(NO_USERMANUAL ON)
+ set(MAKE_TESTS OFF)
list(APPEND QT_EXTRA_COMPONENTS AndroidExtras)
set(SUBSURFACE_LINK_LIBRARIES ${SUBSURFACE_LINK_LIBRARIES} -llog)
elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux")
@@ -257,12 +261,18 @@ if (SUBSURFACE_TARGET_EXECUTABLE MATCHES "DesktopExecutable")
find_package(Qt5 5.9.1 REQUIRED COMPONENTS ${QT_FIND_COMPONENTS} LinguistTools Test QuickTest)
else()
# Kirigami 5.62 and newer require at least Qt 5.12
- find_package(Qt5 5.12 REQUIRED COMPONENTS ${QT_FIND_COMPONENTS} LinguistTools Test QuickTest)
+ if(ANDROID)
+ find_package(Qt5 5.12 REQUIRED COMPONENTS ${QT_FIND_COMPONENTS} LinguistTools)
+ else()
+ find_package(Qt5 5.12 REQUIRED COMPONENTS ${QT_FIND_COMPONENTS} LinguistTools Test QuickTest)
+ endif()
endif()
foreach(_QT_COMPONENT ${QT_FIND_COMPONENTS})
list(APPEND QT_LIBRARIES Qt5::${_QT_COMPONENT})
endforeach()
-set(QT_TEST_LIBRARIES ${QT_LIBRARIES} Qt5::Test Qt5::QuickTest)
+if(NOT ANDROID)
+ set(QT_TEST_LIBRARIES ${QT_LIBRARIES} Qt5::Test Qt5::QuickTest)
+endif()
#set up the subsurface_link_libraries variable
set(SUBSURFACE_LINK_LIBRARIES ${SUBSURFACE_LINK_LIBRARIES} ${LIBDIVECOMPUTER_LIBRARIES} ${LIBGIT2_LIBRARIES} ${LIBUSB_LIBRARIES})