--- qtwebkit-tp5/Source/cmake/ECMGeneratePriFile.cmake.orig	2017-02-10 09:36:07.508360400 +0300
+++ qtwebkit-tp5/Source/cmake/ECMGeneratePriFile.cmake	2017-02-10 09:44:52.735367300 +0300
@@ -101,7 +101,11 @@
   query_qmake(qt_host_data_dir QT_HOST_DATA)
   set(ECM_MKSPECS_INSTALL_DIR ${qt_host_data_dir}/mkspecs/modules CACHE PATH "The directory where mkspecs will be installed to.")
 else()
-  set(ECM_MKSPECS_INSTALL_DIR mkspecs/modules CACHE PATH "The directory where mkspecs will be installed to.")
+  if(MINGW)
+    set(ECM_MKSPECS_INSTALL_DIR share/qt5/mkspecs/modules CACHE PATH "The directory where mkspecs will be installed to.")
+  else()
+    set(ECM_MKSPECS_INSTALL_DIR mkspecs/modules CACHE PATH "The directory where mkspecs will be installed to.")
+  endif()
 endif()
 
 function(ECM_GENERATE_PRI_FILE)
