summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt6
1 files changed, 6 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index caec2fbe2..a36b61f07 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -225,6 +225,12 @@ if(BTSUPPORT)
list(APPEND QT_EXTRA_LIBRARIES Qt5::Bluetooth)
endif()
+if(ANDROID)
+ # when building for Android, the toolchain file requires all cmake modules
+ # to be inside the CMAKE_FIND_ROOT_PATH - which prevents cmake from finding
+ # our Qt installation. This is ugly, but it works.
+ set(CMAKE_FIND_ROOT_PATH "/;${CMAKE_FIND_ROOT_PATH}")
+endif()
find_package(Qt5 REQUIRED COMPONENTS Core Concurrent Widgets Network Svg Test QuickTest LinguistTools Positioning Quick Location ${QT_EXTRA_COMPONENTS})
set(QT_LIBRARIES Qt5::Core Qt5::Concurrent Qt5::Widgets Qt5::Network Qt5::Svg Qt5::Positioning Qt5::Quick Qt5::Location ${QT_EXTRA_LIBRARIES})
set(QT_TEST_LIBRARIES ${QT_LIBRARIES} Qt5::Test Qt5::QuickTest)