diff --git a/src/corelib/Qt6AndroidMacros.cmake b/src/corelib/Qt6AndroidMacros.cmake index 86e189ae883..d54b884c573 100644 --- a/src/corelib/Qt6AndroidMacros.cmake +++ b/src/corelib/Qt6AndroidMacros.cmake @@ -1730,9 +1730,12 @@ function(_qt_internal_android_create_runner_wrapper target) set(qt_core_configure_file_contents "${script_content}") configure_file("${template_file}" "${wrapper_path}") - if(CMAKE_HOST_UNIX) - execute_process(COMMAND chmod +x ${wrapper_path}) - endif() + file(CHMOD "${wrapper_path}" + PERMISSIONS + OWNER_READ OWNER_EXECUTE + GROUP_READ GROUP_EXECUTE + WORLD_READ WORLD_EXECUTE + ) endfunction() # Get the android runner script path and its arguments for a target