Add missing qml-root-path for Android
Add missing qml root path variable in the deployment configuration file. Not having this variable will cause androiddeployqt not use the qml dependency scanner to package all relevant dependencies. This patch also fixes QT_ANDROID_BUNDLED_FILES files not being processed. Change-Id: I5bca33cdbb57098f283b38516b777571806da9e5 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This commit is contained in:
parent
0798ed8a83
commit
add4c4816c
@ -2123,7 +2123,12 @@ function(add_qml_module target)
|
|||||||
string(REPLACE "." "_" qmldir_resource_name ${arg_TARGET_PATH})
|
string(REPLACE "." "_" qmldir_resource_name ${arg_TARGET_PATH})
|
||||||
string(REPLACE "/" "_" qmldir_resource_name ${qmldir_resource_name})
|
string(REPLACE "/" "_" qmldir_resource_name ${qmldir_resource_name})
|
||||||
set(qmldir_resource_name "${qmldir_resource_name}_qmldir")
|
set(qmldir_resource_name "${qmldir_resource_name}_qmldir")
|
||||||
add_qt_resource(${target} ${uri_target}
|
get_target_property(target_resource_prefix ${target} QT_RESOURCE_PREFIX)
|
||||||
|
set_source_files_properties("${CMAKE_CURRENT_SOURCE_DIR}/qmldir"
|
||||||
|
PROPERTIES QT_RESOURCE_ALIAS "qmldir"
|
||||||
|
)
|
||||||
|
add_qt_resource(${target} ${qmldir_resource_name}
|
||||||
|
PREFIX ${target_resource_prefix}
|
||||||
FILES "${CMAKE_CURRENT_SOURCE_DIR}/qmldir"
|
FILES "${CMAKE_CURRENT_SOURCE_DIR}/qmldir"
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
@ -74,6 +74,7 @@ function(qt_android_dependencies target)
|
|||||||
get_target_property(arg_BUNDLED_JAR_DEPENDENCIES ${target} QT_ANDROID_BUNDLED_JAR_DEPENDENCIES)
|
get_target_property(arg_BUNDLED_JAR_DEPENDENCIES ${target} QT_ANDROID_BUNDLED_JAR_DEPENDENCIES)
|
||||||
get_target_property(arg_LIB_DEPENDENCIES ${target} QT_ANDROID_LIB_DEPENDENCIES)
|
get_target_property(arg_LIB_DEPENDENCIES ${target} QT_ANDROID_LIB_DEPENDENCIES)
|
||||||
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_PERMISSIONS ${target} QT_ANDROID_PERMISSIONS)
|
get_target_property(arg_PERMISSIONS ${target} QT_ANDROID_PERMISSIONS)
|
||||||
get_target_property(module_plugins ${target} MODULE_PLUGIN_TYPES)
|
get_target_property(module_plugins ${target} MODULE_PLUGIN_TYPES)
|
||||||
|
|
||||||
@ -82,7 +83,8 @@ function(qt_android_dependencies target)
|
|||||||
AND (NOT arg_LIB_DEPENDENCY_REPLACEMENTS)
|
AND (NOT arg_LIB_DEPENDENCY_REPLACEMENTS)
|
||||||
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_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()
|
||||||
endif()
|
endif()
|
||||||
|
@ -251,22 +251,20 @@ endif()
|
|||||||
|
|
||||||
#TODO: ANDROID_VERSION_CODE, doesn't seem to be used?
|
#TODO: ANDROID_VERSION_CODE, doesn't seem to be used?
|
||||||
|
|
||||||
#TODO: QML import path, could be a property? Example below:
|
get_target_property(qml_import_path ${target} QT_QML_IMPORT_PATH)
|
||||||
#get_target_property(qml_import_path ${target} QT_QML_IMPORT_PATH)
|
if (qml_import_path)
|
||||||
#if (qml_import_path)
|
file(TO_NATIVE_PATH "${qml_import_path}" qml_import_path_native)
|
||||||
# file(TO_NATIVE_PATH "${qml_import_path}" qml_import_path_native)
|
file(APPEND ${deploy_file}
|
||||||
# file(APPEND ${deploy_file}
|
" \"qml-import-path\": \"${qml_import_path_native}\",\n")
|
||||||
# " \"qml-import-path\": \"${qml_import_path_native}\",\n")
|
endif()
|
||||||
#endif()
|
|
||||||
|
|
||||||
#TODO: QML root path, could be a property? Example below:
|
get_target_property(qml_root_path ${target} QT_QML_ROOT_PATH)
|
||||||
#get_target_property(qml_root_path ${target} QT_QML_ROOT_PATH)
|
if(NOT qml_root_path)
|
||||||
#if(NOT qml_root_path)
|
set(qml_root_path "${target_source_dir}")
|
||||||
# set(qml_root_path "${target_source_dir}")
|
endif()
|
||||||
#endif()
|
file(TO_NATIVE_PATH "${qml_root_path}" qml_root_path_native)
|
||||||
#file(TO_NATIVE_PATH "${qml_root_path}" qml_root_path_native)
|
file(APPEND ${deploy_file}
|
||||||
#file(APPEND ${deploy_file}
|
" \"qml-root-path\": \"${qml_root_path_native}\",\n")
|
||||||
# " \"qml-root-path\": \"${qml_root_path_native}\",\n")
|
|
||||||
|
|
||||||
# App binary
|
# App binary
|
||||||
file(TO_NATIVE_PATH "${target_binary_dir}/lib${target_output_name}.so" target_binary_dir_native)
|
file(TO_NATIVE_PATH "${target_binary_dir}/lib${target_output_name}.so" target_binary_dir_native)
|
||||||
|
Loading…
Reference in New Issue
Block a user