summaryrefslogtreecommitdiffstats
path: root/cmake/README.md
diff options
context:
space:
mode:
authorLeander Beernaert <leander.beernaert@qt.io>2019-06-27 15:27:14 +0200
committerLeander Beernaert <leander.beernaert@qt.io>2019-06-27 13:45:58 +0000
commitccc581c9fd20484e01e08a2feb35b2c8eebd1dbd (patch)
tree4f3ddee5f0838ffeee5b6f7a452032cc2b1804a6 /cmake/README.md
parent20bf867a72f9ec27205bef3ec62403f72aca1adb (diff)
Add auto detection routines for android
Add QtAutoDectect cmake which has routines to handle the vcpkg detection as well as set up some android configuration parameters. The latter will contribute towards keeping the cmake configuration commands shorter when targeting android. Change-Id: I721291c8dce39b5c298565a46867ddcab2df90e8 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'cmake/README.md')
-rw-r--r--cmake/README.md4
1 files changed, 3 insertions, 1 deletions
diff --git a/cmake/README.md b/cmake/README.md
index 4239fb0ce2..4a72dee1a0 100644
--- a/cmake/README.md
+++ b/cmake/README.md
@@ -147,13 +147,15 @@ Vcpkg for Android can be set up using the following steps:
* Set the ``ANDROID_SDK_HOME`` environment variable to the path where you have installed the Android SDK.
* Build Qt dependencies: ``vcpkg install @qt-packages-android.txt``
-When running cmake in qtbase, pass ``-DCMAKE_TOOLCHAIN_FILE=$ANDROID_NDK_HOME/build/cmake/android.toolchain.cmake -DQT_HOST_PATH=/path/to/your/host/build -DANDROID_NATIVE_API_LEVEL=21 -DANDROID_SDK_ROOT=$ANDROID_SDK_HOME -DANDROID_STL=c++_shared -DCMAKE_INSTALL_PREFIX=$INSTALL_PATH``
+When running cmake in qtbase, pass ``-DCMAKE_TOOLCHAIN_FILE=$ANDROID_NDK_HOME/build/cmake/android.toolchain.cmake -DQT_HOST_PATH=/path/to/your/host/build -DANDROID_SDK_ROOT=$ANDROID_SDK_HOME -DCMAKE_INSTALL_PREFIX=$INSTALL_PATH``
If you don't supply the configuration argument ``-DANDROID_ABI=...``, it will default to ``armeabi-v7a``. To target other architectures, use on of the following values:
* arm64: ``-DANDROID_ABI=arm64-v8``
* x86: ``-DANDROID_ABI=x86``
* x86_64: ``-DANDROID_ABI=x86_64``
+By default we set the android API level to 21. Should you need to change this supply the following configuration argument to the above CMake call: ``-DANDROID_NATIVE_API_LEVEL=${API_LEVEL}``
+
# Debugging CMake files
CMake allows specifying the ``--trace`` and ``--trace-expand`` options, which work like ``qmake -d -d``: As the cmake code is evaluated, the values of parameters and variables is shown. This can be a lot of output, so you may want to redirect it to a file.