CMake: handle Android features dependencies for modules
QMake used to allow retrieving the Android features list for a modules. The dependencies are written to *-android-dependencies.xml files and are read by androiddeployqt. This option was missed at some point along the way of writing CMake port for Qt 6. Change-Id: Ic0b82f024567e640968f97aeff2db1888f2b53a5 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> (cherry picked from commit 09fc4f9525740b8c671c036413153d3419750b99) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
f78810b936
commit
9b98e84da5
@ -65,6 +65,16 @@ define_property(TARGET
|
|||||||
FULL_DOCS
|
FULL_DOCS
|
||||||
"Qt Module android permission list."
|
"Qt Module android permission list."
|
||||||
)
|
)
|
||||||
|
|
||||||
|
define_property(TARGET
|
||||||
|
PROPERTY
|
||||||
|
QT_ANDROID_FEATURES
|
||||||
|
BRIEF_DOCS
|
||||||
|
"Qt Module android feature list."
|
||||||
|
FULL_DOCS
|
||||||
|
"Qt Module android feature list."
|
||||||
|
)
|
||||||
|
|
||||||
# Generate Qt Module -android-dependencies.xml required by the
|
# Generate Qt Module -android-dependencies.xml required by the
|
||||||
# androiddeploytoolqt to successfully copy all the plugins and other dependent
|
# androiddeploytoolqt to successfully copy all the plugins and other dependent
|
||||||
# items into tha APK
|
# items into tha APK
|
||||||
@ -80,6 +90,7 @@ function(qt_android_dependencies target)
|
|||||||
get_target_property(arg_LIB_DEPENDENCY_REPLACEMENTS ${target} QT_ANDROID_LIB_DEPENDENCY_REPLACEMENTS)
|
get_target_property(arg_LIB_DEPENDENCY_REPLACEMENTS ${target} QT_ANDROID_LIB_DEPENDENCY_REPLACEMENTS)
|
||||||
get_target_property(arg_BUNDLED_FILES ${target} QT_ANDROID_BUNDLED_FILES)
|
get_target_property(arg_BUNDLED_FILES ${target} QT_ANDROID_BUNDLED_FILES)
|
||||||
get_target_property(arg_PERMISSIONS ${target} QT_ANDROID_PERMISSIONS)
|
get_target_property(arg_PERMISSIONS ${target} QT_ANDROID_PERMISSIONS)
|
||||||
|
get_target_property(arg_FEATURES ${target} QT_ANDROID_FEATURES)
|
||||||
get_target_property(module_plugins ${target} MODULE_PLUGIN_TYPES)
|
get_target_property(module_plugins ${target} MODULE_PLUGIN_TYPES)
|
||||||
|
|
||||||
if ((NOT module_plugins)
|
if ((NOT module_plugins)
|
||||||
@ -88,6 +99,7 @@ function(qt_android_dependencies target)
|
|||||||
AND (NOT arg_LIB_DEPENDENCIES)
|
AND (NOT arg_LIB_DEPENDENCIES)
|
||||||
AND (NOT arg_BUNDLED_JAR_DEPENDENCIES)
|
AND (NOT arg_BUNDLED_JAR_DEPENDENCIES)
|
||||||
AND (NOT arg_PERMISSIONS)
|
AND (NOT arg_PERMISSIONS)
|
||||||
|
AND (NOT arg_FEATURES)
|
||||||
AND (NOT arg_BUNDLED_FILES))
|
AND (NOT arg_BUNDLED_FILES))
|
||||||
# None of the values were set, so there's nothing to do
|
# None of the values were set, so there's nothing to do
|
||||||
return()
|
return()
|
||||||
@ -194,6 +206,13 @@ function(qt_android_dependencies target)
|
|||||||
endforeach()
|
endforeach()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
# Android Features
|
||||||
|
if(arg_FEATURES)
|
||||||
|
foreach(feature IN LISTS arg_FEATURES)
|
||||||
|
string(APPEND file_contents "<feature name=\"${feature}\" />\n")
|
||||||
|
endforeach()
|
||||||
|
endif()
|
||||||
|
|
||||||
string(APPEND file_contents "</depends></lib>")
|
string(APPEND file_contents "</depends></lib>")
|
||||||
string(APPEND file_contents "</dependencies></rules>\n")
|
string(APPEND file_contents "</dependencies></rules>\n")
|
||||||
file(WRITE ${dependency_file} ${file_contents})
|
file(WRITE ${dependency_file} ${file_contents})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user