diff options
author | Leander Beernaert <leander.beernaert@qt.io> | 2019-06-03 18:39:28 +0200 |
---|---|---|
committer | Leander Beernaert <leander.beernaert@qt.io> | 2019-06-04 10:08:20 +0000 |
commit | bb52bd49e1917bee787c0d5c8a56e2734bb77710 (patch) | |
tree | bd010e913ae3e51308ac896c45cccc18c506539f /cmake | |
parent | 0900298d466e819dd6d8fd39c0be333dc09af189 (diff) |
Android: Fix linker erros for liblog & libc
For the android platform library add dependencies on liblog and libc
for every Qt target.
The libraries are shipped by default in the Android NDK so they will
always be present.
Change-Id: Ic4a13be32118710b11effabfb16e27bd2d10809f
Reviewed-by: Qt CMake Build Bot
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/QtBaseGlobalTargets.cmake | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/cmake/QtBaseGlobalTargets.cmake b/cmake/QtBaseGlobalTargets.cmake index 82fd4ed2da..2bda1eddab 100644 --- a/cmake/QtBaseGlobalTargets.cmake +++ b/cmake/QtBaseGlobalTargets.cmake @@ -10,6 +10,14 @@ target_include_directories(Platform ) target_compile_definitions(Platform INTERFACE ${QT_PLATFORM_DEFINITIONS}) + +# When building on android we need to link against their logging and C library +# in order to satisfy linker dependencies. Both of these libraries are part of +# the NDK. +if (ANDROID) + target_link_libraries(Platform INTERFACE log c) +endif() + set(__GlobalConfig_path_suffix "${INSTALL_CMAKE_NAMESPACE}") qt_path_join(__GlobalConfig_build_dir ${QT_CONFIG_BUILD_DIR} ${__GlobalConfig_path_suffix}) qt_path_join(__GlobalConfig_install_dir ${QT_CONFIG_INSTALL_DIR} ${__GlobalConfig_path_suffix}) |