From 3cfaa19c60e43e022e97f5ebe76d70a0610950a6 Mon Sep 17 00:00:00 2001 From: Alexandru Croitor Date: Mon, 4 Nov 2019 14:42:59 +0100 Subject: [PATCH] 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 Reviewed-by: Simon Hausmann Reviewed-by: Qt CMake Build Bot --- cmake/QtBuild.cmake | 2 +- cmake/QtBuildInternals/QtBuildInternalsAndroid.cmake | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/cmake/QtBuild.cmake b/cmake/QtBuild.cmake index ee50fd2f33..b7d7ab3eaa 100644 --- a/cmake/QtBuild.cmake +++ b/cmake/QtBuild.cmake @@ -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 diff --git a/cmake/QtBuildInternals/QtBuildInternalsAndroid.cmake b/cmake/QtBuildInternals/QtBuildInternalsAndroid.cmake index 7f8b6df232..51645f48d5 100644 --- a/cmake/QtBuildInternals/QtBuildInternalsAndroid.cmake +++ b/cmake/QtBuildInternals/QtBuildInternalsAndroid.cmake @@ -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)