diff --git a/cmake/QtBuild.cmake b/cmake/QtBuild.cmake index a587ff8d4a..3370cb7e6b 100644 --- a/cmake/QtBuild.cmake +++ b/cmake/QtBuild.cmake @@ -2123,7 +2123,12 @@ function(add_qml_module target) string(REPLACE "." "_" qmldir_resource_name ${arg_TARGET_PATH}) string(REPLACE "/" "_" qmldir_resource_name ${qmldir_resource_name}) 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" ) endif() diff --git a/cmake/QtBuildInternals/QtBuildInternalsAndroid.cmake b/cmake/QtBuildInternals/QtBuildInternalsAndroid.cmake index 4677c9dcae..ecba1dd08f 100644 --- a/cmake/QtBuildInternals/QtBuildInternalsAndroid.cmake +++ b/cmake/QtBuildInternals/QtBuildInternalsAndroid.cmake @@ -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_LIB_DEPENDENCIES ${target} QT_ANDROID_LIB_DEPENDENCIES) 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(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_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 return() endif() diff --git a/cmake/QtPlatformAndroid.cmake b/cmake/QtPlatformAndroid.cmake index bc7e0aa862..6c27088765 100644 --- a/cmake/QtPlatformAndroid.cmake +++ b/cmake/QtPlatformAndroid.cmake @@ -251,22 +251,20 @@ endif() #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) - #if (qml_import_path) - # file(TO_NATIVE_PATH "${qml_import_path}" qml_import_path_native) - # file(APPEND ${deploy_file} - # " \"qml-import-path\": \"${qml_import_path_native}\",\n") - #endif() + get_target_property(qml_import_path ${target} QT_QML_IMPORT_PATH) + if (qml_import_path) + file(TO_NATIVE_PATH "${qml_import_path}" qml_import_path_native) + file(APPEND ${deploy_file} + " \"qml-import-path\": \"${qml_import_path_native}\",\n") + endif() - #TODO: QML root path, could be a property? Example below: - #get_target_property(qml_root_path ${target} QT_QML_ROOT_PATH) - #if(NOT qml_root_path) - # set(qml_root_path "${target_source_dir}") - #endif() - #file(TO_NATIVE_PATH "${qml_root_path}" qml_root_path_native) - #file(APPEND ${deploy_file} - # " \"qml-root-path\": \"${qml_root_path_native}\",\n") + get_target_property(qml_root_path ${target} QT_QML_ROOT_PATH) + if(NOT qml_root_path) + set(qml_root_path "${target_source_dir}") + endif() + file(TO_NATIVE_PATH "${qml_root_path}" qml_root_path_native) + file(APPEND ${deploy_file} + " \"qml-root-path\": \"${qml_root_path_native}\",\n") # App binary file(TO_NATIVE_PATH "${target_binary_dir}/lib${target_output_name}.so" target_binary_dir_native)