Fix interface library issues on Android

Don't call qt_android_dependencies for interface libraries.
Also make sure not to set properties which don't start with
INTERFACE_ prefix.

Change-Id: I0afdffd34c9aebe0d7ac4731b57dd4d505f84570
Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Qt CMake Build Bot
This commit is contained in:
Alexandru Croitor 2019-11-04 14:42:59 +01:00
parent 8294d85d80
commit 3cfaa19c60
2 changed files with 5 additions and 1 deletions

View File

@ -1595,7 +1595,7 @@ set(QT_CMAKE_EXPORT_NAMESPACE ${QT_CMAKE_EXPORT_NAMESPACE})")
PRIVATE_HEADER DESTINATION ${INSTALL_INCLUDEDIR}/${module}/${PROJECT_VERSION}/${module}/private
)
if (ANDROID)
if (ANDROID AND NOT arg_HEADER_MODULE)
# Record install library location so it can be accessed by
# qt_android_dependencies without having to specify it again.
set_target_properties(${target} PROPERTIES

View File

@ -69,6 +69,10 @@ define_property(TARGET
# androiddeploytoolqt to successfully copy all the plugins and other dependent
# items into tha APK
function(qt_android_dependencies target)
get_target_property(target_type "${target}" TYPE)
if(target_type STREQUAL "INTERFACE_LIBRARY")
return()
endif()
get_target_property(arg_JAR_DEPENDENCIES ${target} QT_ANDROID_JAR_DEPENDENCIES)
get_target_property(arg_BUNDLED_JAR_DEPENDENCIES ${target} QT_ANDROID_BUNDLED_JAR_DEPENDENCIES)