--- collada-dom/CMakeLists.txt.orig	2013-12-25 21:37:14.645200000 +0400
+++ collada-dom/CMakeLists.txt	2013-12-25 21:53:03.151000000 +0400
@@ -144,7 +150,7 @@
   set(Boost_CFLAGS "-DBOOST_ALL_DYN_LINK -DBOOST_ALL_NO_LIB")
 endif()
   
-set(Boost_ADDITIONAL_VERSIONS "1.46" "1.45" "1.44" "1.43" "1.42" "1.41" "1.40" "1.39" "1.38" "1.37.0" "1.37" "1.35.0" "1.34.1" "1.34.0" "1.34" "1.33.1" "1.33.0" "1.33")
+set(Boost_ADDITIONAL_VERSIONS "1.57" "1.56" "1.55" "1.55.0" "1.46" "1.45" "1.44" "1.43" "1.42" "1.41" "1.40" "1.39" "1.38" "1.37.0" "1.37" "1.35.0" "1.34.1" "1.34.0" "1.34" "1.33.1" "1.33.0" "1.33")
 
 if( NOT $ENV{BOOST_INCLUDEDIR} STREQUAL "" )
   set(Boost_INCLUDE_DIR $ENV{BOOST_INCLUDEDIR})
@@ -182,7 +182,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")
@@ -252,20 +258,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()
diff -Naur collada-dom-orig/dom/include/dae/daeUtils.h collada-dom/dom/include/dae/daeUtils.h
--- collada-dom-orig/dom/include/dae/daeUtils.h	2013-09-04 20:43:13.000000000 +0400
+++ collada-dom/dom/include/dae/daeUtils.h	2013-09-05 16:42:38.707031200 +0400
@@ -82,7 +82,9 @@
     DLLSPEC const std::string& getSafeTmpDir();
 #endif //NO_BOOST
 
+#ifndef __MINGW64_VERSION_MAJOR
     DLLSPEC int strcasecmp(const char* str1, const char* str2);
+#endif
 	DLLSPEC std::string tolower(const std::string& s);
 
 	// Disable VS warning
diff -Naur collada-dom-orig/dom/include/dae/daeWin32Platform.h collada-dom/dom/include/dae/daeWin32Platform.h
--- collada-dom-orig/dom/include/dae/daeWin32Platform.h	2013-09-04 20:43:13.000000000 +0400
+++ collada-dom/dom/include/dae/daeWin32Platform.h	2013-09-05 14:35:01.631835900 +0400
@@ -20,7 +20,7 @@
 #define PLATFORM_FLOAT32 float
 #define PLATFORM_FLOAT64 double
 
-#if _MSC_VER <= 1200
+#ifndef __MINGW32__
 typedef int intptr_t;
 #endif
 
diff -Naur collada-dom-orig/dom/src/dae/daeMetaGroup.cpp collada-dom/dom/src/dae/daeMetaGroup.cpp
--- collada-dom/dom/src/dae/daeMetaGroup.cpp.orig	2017-02-01 09:24:01.549922300 +0300
+++ collada-dom/dom/src/dae/daeMetaGroup.cpp	2017-02-01 09:24:05.233528900 +0300
@@ -26,7 +26,7 @@
 	(void)offset;
 	daeString nm = child->getElementName();
 	if ( findChild( nm ) == NULL ) {
-		return false;
+		return 0;
 	}
 	daeElementRef el;
 
diff -Naur collada-dom-orig/dom/src/dae/daeUtils.cpp collada-dom/dom/src/dae/daeUtils.cpp
--- collada-dom-orig/dom/src/dae/daeUtils.cpp	2013-09-04 20:43:14.000000000 +0400
+++ collada-dom/dom/src/dae/daeUtils.cpp	2013-09-05 16:42:54.957031200 +0400
@@ -195,13 +195,15 @@
 }
 #endif //NO_BOOST
 
+#ifndef __MINGW64_VERSION_MAJOR
 int cdom::strcasecmp(const char* str1, const char* str2) {
 #ifdef _MSC_VER
 	return _stricmp(str1, str2);
 #else
 	return ::strcasecmp(str1, str2);
 #endif
 }
+#endif
 
 string cdom::tolower(const string& s) {
 	string result;
diff -Naur collada-dom-orig/dom/external-libs/minizip-1.1/CMakeLists.txt collada-dom/dom/external-libs/minizip-1.1/CMakeLists.txt
--- collada-dom-orig/dom/external-libs/minizip-1.1/CMakeLists.txt	2013-09-04 20:43:11.000000000 +0400
+++ collada-dom/dom/external-libs/minizip-1.1/CMakeLists.txt	2013-09-05 18:08:14.522460900 +0400
@@ -1,6 +1,6 @@
 include_directories(${ZLIB_INCLUDE_DIR})
 set(minizip_files crypt.h  ioapi.c  ioapi.h  mztools.c  mztools.h  unzip.c  unzip.h  zip.c  zip.h)
-if( MSVC )
+if(WIN32)
   set(minizip_files ${minizip_files} iowin32.c  iowin32.h)
 endif()
 add_library(minizip STATIC ${minizip_files})
