--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -183,7 +183,7 @@
   set(COLLADA_DOM_BOOST_LIB_DIRS "${COLLADA_DOM_BOOST_LIB_DIRS} -L${ldir}")
 endforeach()
 
-if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
+if((CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX) AND NOT MINGW)
   set(EXTRA_COMPILE_FLAGS "${COLLADA_DOM_EXTERNAL_FLAGS} -DCOLLADA_DOM_NAMESPACE -fPIC")
 else()
   set(EXTRA_COMPILE_FLAGS "${COLLADA_DOM_EXTERNAL_FLAGS} -DCOLLADA_DOM_NAMESPACE")
@@ -266,20 +266,20 @@
 
 add_subdirectory(dom)
 
-if(UNIX)
+if(UNIX OR MINGW)
   configure_file("${CMAKE_CURRENT_SOURCE_DIR}/collada-dom.pc.in" "${CMAKE_CURRENT_BINARY_DIR}/collada-dom.pc" @ONLY IMMEDIATE)
   install(FILES ${CMAKE_CURRENT_BINARY_DIR}/collada-dom.pc DESTINATION lib${LIB_SUFFIX}/pkgconfig COMPONENT ${COMPONENT_PREFIX}-dev)
 endif()
 
 if( OPT_COLLADA15 )
-  if(UNIX)
+  if(UNIX OR MINGW)
     configure_file("${CMAKE_CURRENT_SOURCE_DIR}/collada-dom-150.pc.in" "${CMAKE_CURRENT_BINARY_DIR}/collada-dom-150.pc" @ONLY IMMEDIATE)
     install(FILES ${CMAKE_CURRENT_BINARY_DIR}/collada-dom-150.pc DESTINATION lib${LIB_SUFFIX}/pkgconfig COMPONENT ${COMPONENT_PREFIX}-dev)
   endif()
 endif()
 
 if( OPT_COLLADA14 )
-  if(UNIX)
+  if(UNIX OR MINGW)
     configure_file("${CMAKE_CURRENT_SOURCE_DIR}/collada-dom-141.pc.in" "${CMAKE_CURRENT_BINARY_DIR}/collada-dom-141.pc" @ONLY IMMEDIATE)
     install(FILES ${CMAKE_CURRENT_BINARY_DIR}/collada-dom-141.pc DESTINATION lib${LIB_SUFFIX}/pkgconfig COMPONENT ${COMPONENT_PREFIX}-dev)
   endif()
--- a/dom/include/dae/daeWin32Platform.h
+++ b/dom/include/dae/daeWin32Platform.h
@@ -20,7 +20,7 @@
 #define PLATFORM_FLOAT32 float
 #define PLATFORM_FLOAT64 double
 
-#if _MSC_VER <= 1200
+#ifndef __MINGW32__
 typedef int intptr_t;
 #endif
 
--- a/dom/src/modules/LIBXMLPlugin/daeLIBXMLPlugin.cpp
+++ b/dom/src/modules/LIBXMLPlugin/daeLIBXMLPlugin.cpp
@@ -30,14 +30,14 @@
 
 #include <limits>
 #include <iomanip>
-using namespace std;
 
 #include <zip.h> // for saving compressed files
 #ifdef _WIN32
 #include <iowin32.h>
 #else
 #include <unistd.h>
 #endif
+using namespace std;
 
 // Some helper functions for working with libxml
 namespace {
--- a/dom/CMakeLists.txt
+++ b/dom/CMakeLists.txt
@@ -37,8 +37,8 @@
   CLEAN_DIRECT_OUTPUT 1
   SOVERSION 0 # always have it 0 since we're including the soversion as part of the library name
   VERSION ${COLLADA_DOM_VERSION})
-if( MSVC )
-  install(TARGETS collada-dom EXPORT collada-dom-targets RUNTIME DESTINATION bin COMPONENT ${COMPONENT_PREFIX}-base LIBRARY DESTINATION bin COMPONENT ${COMPONENT_PREFIX}-base ARCHIVE DESTINATION lib${LIB_SUFFIX} COMPONENT ${COMPONENT_PREFIX}-base)
+if( WIN32 )
+  install(TARGETS collada-dom EXPORT collada-dom-targets RUNTIME DESTINATION bin COMPONENT ${COMPONENT_PREFIX}-base LIBRARY DESTINATION lib COMPONENT ${COMPONENT_PREFIX}-base ARCHIVE DESTINATION lib${LIB_SUFFIX} COMPONENT ${COMPONENT_PREFIX}-base)
 else()
   install(TARGETS collada-dom EXPORT collada-dom-targets DESTINATION lib${LIB_SUFFIX} COMPONENT ${COMPONENT_PREFIX}-base )
 endif()
