--- ogre3d-1.11.1/CMake/CMakeLists.txt.orig	2015-02-18 06:49:28.643600000 +0300
+++ ogre3d-1.11.1/CMake/CMakeLists.txt	2015-02-18 06:50:00.389600000 +0300
@@ -13,7 +13,7 @@
 # directory, but can also be used for custom projects.
 #############################################################
 
-if(WIN32 OR APPLE)
+if(MSVC OR APPLE)
 	set(OGRE_CMAKE_DIR "CMake")
 else()
 	set(OGRE_CMAKE_DIR "${OGRE_LIB_DIRECTORY}/OGRE/cmake")
--- ogre3d-1.11.1/Docs/CMakeLists.txt.orig	2015-02-18 06:46:47.946600000 +0300
+++ ogre3d-1.11.1/Docs/CMakeLists.txt	2015-02-18 06:47:05.325000000 +0300
@@ -13,9 +13,9 @@
 ###############################################################
 
 # Set docs target directory
-if (WIN32 OR APPLE)
+if (MSVC OR APPLE)
   set(OGRE_DOCS_PATH "Docs")
-elseif (UNIX)
+elseif (UNIX OR MINGW)
   set(OGRE_DOCS_PATH "share/doc/OGRE")
 endif ()
 
--- ogre3d-1.11.1/CMake/InstallResources.cmake.orig	2015-02-18 06:34:55.206800000 +0300
+++ ogre3d-1.11.1/CMake/InstallResources.cmake	2015-02-18 06:42:48.448400000 +0300
@@ -12,7 +12,7 @@
 ##################################################################
 
 if (WIN32)
-  set(OGRE_MEDIA_PATH "Media")
+  set(OGRE_MEDIA_PATH "share/OGRE/Media")
   set(OGRE_MEDIA_DIR_REL "${CMAKE_INSTALL_PREFIX}/${OGRE_MEDIA_PATH}")
   set(OGRE_TEST_MEDIA_DIR_REL "../Tests/${OGRE_MEDIA_PATH}")
   set(OGRE_PLUGIN_DIR_REL "${CMAKE_INSTALL_PREFIX}/bin")
@@ -242,7 +242,7 @@
 # Create the CMake package files
 include(CMakePackageConfigHelpers)
 
-if(WIN32 OR APPLE)
+if(MSVC OR APPLE)
   set(OGRE_CMAKE_DIR "CMake")
 else()
   set(OGRE_CMAKE_DIR "${OGRE_LIB_DIRECTORY}/OGRE/cmake")
--- ogre3d-1.11.1/CMake/ConfigureBuild.cmake.orig	2015-02-18 06:56:58.156600000 +0300
+++ ogre3d-1.11.1/CMake/ConfigureBuild.cmake	2015-02-18 06:58:52.333000000 +0300
@@ -148,9 +148,13 @@
 endif ()
 
 # Create the pkg-config package files on Unix systems
-if (UNIX)
+if (UNIX OR MINGW)
   set(OGRE_PLUGIN_PREFIX "")
-  set(OGRE_PLUGIN_EXT ".so")
+  if (MINGW)
+    set(OGRE_PLUGIN_EXT ".dll")
+  else()
+    set(OGRE_PLUGIN_EXT ".so")
+  endif()
   set(OGRE_PAGING_ADDITIONAL_PACKAGES "")
   if (OGRE_STATIC)
     set(OGRE_PLUGIN_PREFIX "lib")
--- ogre3d-1.12.0/Samples/CMakeLists.txt.orig	2015-02-18 13:59:42.807600000 +0300
+++ ogre3d-1.12.0/Samples/CMakeLists.txt	2015-02-18 13:59:57.800200000 +0300
@@ -81,9 +81,9 @@
   
 # Install sample sources
 if (OGRE_INSTALL_SAMPLES_SOURCE)
-  if (WIN32 OR APPLE)
+  if (MSVC OR APPLE)
     set(OGRE_SAMPLES_DIR Samples)
-  elseif (UNIX)
+  elseif (UNIX OR MINGW)
     set(OGRE_SAMPLES_DIR share/OGRE/Samples)
   endif ()
   install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/ DESTINATION ${OGRE_SAMPLES_DIR}
