summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLeander Beernaert <leander.beernaert@qt.io>2019-06-06 14:29:31 +0200
committerLeander Beernaert <leander.beernaert@qt.io>2019-06-12 07:21:01 +0000
commit152b22a7b00c8365808dd58d2afb42ff86ed75ec (patch)
treeaaeaf7e272f744a7a8e24533df9dad9ab9bd224b /src
parent118e04013ab35fd5b6607ca239a44ab80fb064ed (diff)
Android: Generate deployment-settings.json
Generate the android deployment settings json for android apk targets. QtPlatformAndroid is now also deployed as a public build dependency of QtCore. Some minor refactoring has been performed to the naming of variables and functions to better match the public facing apis. Extra settings for the file can be configured using the following target properties: set_target_properties(Core PROPERTIES QT_ANDROID_DEPLOYMENT_DEPENDENCIES "foo;bar" QT_ANDROID_EXTRA_LIBS "foo;bar" QT_ANDROID_EXTRA_PLUGINS "foo;bar" QT_ANDROID_PACKAGE_SOURCE_DIR "/foo/bar/" ) The file is generated using the function qt_android_generate_depoyment_settings(). We need to install the android template files and jar files during the android build as the androiddeployqt tool wont work if parts of it are split between the host install and the android install. Added QT_BUILD_QT variable to check whether we are building Qt from source. Finally, we also force the stdlib to shared via cmake configuration with -DANDROID_STL="c++_shared" Change-Id: I063c47e11749d56ba4c6f02101dbcc09e1b9fe87 Reviewed-by: Qt CMake Build Bot Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/android/CMakeLists.txt9
-rw-r--r--src/android/jar/CMakeLists.txt2
2 files changed, 6 insertions, 5 deletions
diff --git a/src/android/CMakeLists.txt b/src/android/CMakeLists.txt
index 7b0b0cd930..a61ff1c4b0 100644
--- a/src/android/CMakeLists.txt
+++ b/src/android/CMakeLists.txt
@@ -1,12 +1,13 @@
# Generated from android.pro.
# special case begin
-# Only build jars during android build?
+# Only build jars during Android build and install the templates for the
+# androiddeployqt tool.
+# android
if (ANDROID)
add_subdirectory(jar)
+ add_subdirectory(java)
+ add_subdirectory(templates)
endif()
# special case end
-# Templates need to be installed during host build
-add_subdirectory(java)
-add_subdirectory(templates)
diff --git a/src/android/jar/CMakeLists.txt b/src/android/jar/CMakeLists.txt
index 31afb3fdf4..066a67591f 100644
--- a/src/android/jar/CMakeLists.txt
+++ b/src/android/jar/CMakeLists.txt
@@ -22,7 +22,7 @@ set(java_sources
${path_prefix}/QtThread.java)
add_jar(QtAndroid
- INCLUDE_JARS ${android_jar}
+ INCLUDE_JARS ${QT_ANDROID_JAR}
SOURCES ${java_sources}
)