--- osgworks/CMakeLists.txt.orig	2014-06-07 18:58:47.209000000 +0400
+++ osgworks/CMakeLists.txt	2014-06-07 18:59:06.849400000 +0400
@@ -243,17 +243,17 @@
 
 #
 # Setup the fpc auto detection files
-if(WIN32)
+if(WIN32 AND NOT MINGW)
     set(OSGWORKS_FPC_LIBRARIES "/libpath:\"\${libdir}\" osgwControls.lib osgwMx.lib osgwTools.lib osgwQuery.lib")
     set(OSGWORKS_FPC_INCLUDES "/I\"\${includedir}\"")
-else(WIN32)
+else(WIN32 AND NOT MINGW)
     set(OSGWORKS_FPC_INCLUDES "-I\${includedir}")
     if(APPLE)
         set(OSGWORKS_FPC_LIBRARIES "-L\${libdir} -losgwControls -losgwMx -losgwTools -losgwQuery")
     else(APPLE)
         set(OSGWORKS_FPC_LIBRARIES "-L\${libdir} -losgwControls -losgwMx -losgwTools -losgwQuery")
     endif(APPLE)
-endif(WIN32)
+endif(WIN32 AND NOT MINGW)
 
 configure_file(extra/osgworks.fpc.in
   "${PROJECT_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR}/flagpoll/osgworks.fpc" @ONLY)
