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)