diff -bur qgis-3.30.0-orig/python/CMakeLists.txt qgis-3.30.0/python/CMakeLists.txt
--- qgis-3.30.0-orig/python/CMakeLists.txt	2023-03-28 03:21:09.084805600 -0600
+++ qgis-3.30.0/python/CMakeLists.txt	2023-03-28 03:18:53.749245200 -0600
@@ -357,6 +357,13 @@
 endif()
 
 if(WITH_CUSTOM_WIDGETS)
+  execute_process(
+    COMMAND cygpath -am "/"
+    OUTPUT_VARIABLE MSYS2_PREFIX
+    OUTPUT_STRIP_TRAILING_WHITESPACE
+    ERROR_QUIET
+  )
+  string(REPLACE "${MSYS2_PREFIX}" "" PYUIC_WIDGET_PLUGIN_DIRECTORY ${PYUIC_WIDGET_PLUGIN_DIRECTORY})
   install(FILES custom_widgets/qgis_customwidgets.py DESTINATION "${PYUIC_WIDGET_PLUGIN_DIRECTORY}")
 endif()
 
