--- mathgl-2.4.2/CMakeLists.txt.orig	2018-07-10 16:04:53 +0000
+++ mathgl-2.4.2/CMakeLists.txt	2018-07-10 16:06:21 +0000
@@ -39,7 +39,7 @@ endif(CMAKE_BUILD_TYPE STREQUAL "Debug")
 set(MathGL_INSTALL_LIB_DIR "lib" CACHE PATH "Installation directory for libraries")
 set(MathGL_INSTALL_BIN_DIR "bin" CACHE PATH "Installation directory for executables")
 set(MathGL_INSTALL_INCLUDE_DIR "include" CACHE PATH "Installation directory for headers")
-if(WIN32 AND NOT CYGWIN)
+if(WIN32 AND NOT CYGWIN AND NOT MSYS AND NOT MINGW)
   set(DEF_INSTALL_CMAKE_DIR cmake)
 else()
   set(DEF_INSTALL_CMAKE_DIR lib/cmake/mathgl)
--- mathgl-2.4.2/scripts/CMakeLists.txt.orig	2018-03-21 12:48:20.000000000 -0400
+++ mathgl-2.4.2/scripts/CMakeLists.txt	2018-07-10 23:10:20.640414400 -0400
@@ -11,13 +11,13 @@ if(enable-dep-dll)
 	install(SCRIPT install-deps.cmake)
 endif(enable-dep-dll)
 
-if(WIN32)
+if(MSVC)
    set(dest ${CMAKE_INSTALL_PREFIX})
 	install(FILES ${CMAKE_SOURCE_DIR}/scripts/FindMathGL2.cmake DESTINATION ${CMAKE_INSTALL_PREFIX} RENAME mathgl2-config.cmake)
-else(WIN32)
+else(MSVC)
    set(dest ${MathGL_INSTALL_LIB_DIR}/cmake/mathgl2/)
 	install(FILES ${CMAKE_SOURCE_DIR}/scripts/FindMathGL2.cmake DESTINATION ${MathGL_INSTALL_LIB_DIR}/cmake/mathgl2/ RENAME mathgl2-config.cmake)
-endif(WIN32)
+endif(MSVC)
 
 #export(TARGETS MathGLTargets FILE "${PROJECT_BINARY_DIR}/MathGL2Targets.cmake")
 export(PACKAGE MathGL2)
