diff --git a/Packaging/process_file_recurse.cmake b/Packaging/process_file_recurse.cmake
index b8f31b4ededfb3faa10d848c5a2e0bbc9f4f7155..4c92906169289ae0961f92df2ba9a68cc9eb5170 100644
--- a/Packaging/process_file_recurse.cmake
+++ b/Packaging/process_file_recurse.cmake
@@ -93,10 +93,14 @@ function(process_file_recurse input_file)
     set(is_system FALSE)
     setif_value_in_list(is_system "${raw_item}" SYSTEM_DLLS)
     if(APPLE AND NOT is_system)
-      if("${raw_item}" MATCHES "@rpath")
-        string(REGEX REPLACE "@rpath." "" raw_item "${raw_item}")
+      if(("${input_file_full_path}" MATCHES "/plugins/") AND ("${raw_item}" MATCHES "${input_file}"))
+        # ignore the check for @rpath on Qt plugins for the library own name
       else()
-        message(FATAL_ERROR "'${raw_item}' does not have @rpath")
+        if("${raw_item}" MATCHES "@rpath")
+          string(REGEX REPLACE "@rpath." "" raw_item "${raw_item}")
+        else()
+          message(FATAL_ERROR "'${raw_item}' does not have @rpath")
+        endif()
       endif()
     endif()