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>
bb10
Leander Beernaert 2019-06-03 18:39:28 +02:00
parent 0900298d46
commit bb52bd49e1
1 changed files with 8 additions and 0 deletions

View File

@ -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})