diff options
author | Cristian Adam <cristian.adam@gmail.com> | 2020-06-24 14:40:45 +0200 |
---|---|---|
committer | Cristian Adam <cristian.adam@gmail.com> | 2020-08-28 20:37:25 +0200 |
commit | 039c2f7a4b326b79e078fca81eed6dedb421c854 (patch) | |
tree | 0395deb1b961a9bc811af8b5b6c45c2a56f25825 /src/corelib/tools | |
parent | 6e7b750791eca9f7502d50ca320a48ad6bcca0d9 (diff) |
CMake: Support add_executable for Android
With the ANDROID_GUI target property set on add_executable targets,
CMake will generate a lib<target>.so file, which is what Qt requires
from a target.
By setting CMAKE_RUNTIME_OUTPUT_DIRECTORY with the same value as
CMAKE_LIBRARY_OUTPUT_DIRECTORY the ANDROID_GUI case will work as
expected in Android multi-abi case.
Instead of the following CMake code:
if (ANDROID)
add_library(test-android SHARED
main.cpp
qml.qrc
)
else()
add_executable(test-android
main.cpp
qml.qrc
)
endif()
you can have:
set(CMAKE_ANDROID_GUI ON)
add_executable(test-android
main.cpp
qml.qrc
)
Change-Id: I3995d6ff731d0525ca86f7260fe61d9ecb7b01ac
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
Diffstat (limited to 'src/corelib/tools')
0 files changed, 0 insertions, 0 deletions