--- a/swig/python/CMakeLists.txt
+++ b/swig/python/CMakeLists.txt
@@ -368,13 +368,21 @@
     if (WIN32)
       string(REPLACE "\\" "\\\\" NATIVE_GDAL_PYTHON_INSTALL_PREFIX "${NATIVE_GDAL_PYTHON_INSTALL_PREFIX}")
     endif ()
-    set(INSTALL_ARGS "${INSTALL_ARGS} \"--prefix=${NATIVE_GDAL_PYTHON_INSTALL_PREFIX}\"")
+    if (MINGW)
+      set(INSTALL_ARGS "${INSTALL_ARGS} \"--prefix=${GDAL_PYTHON_INSTALL_PREFIX}\"")
+    else ()
+      set(INSTALL_ARGS "${INSTALL_ARGS} \"--prefix=${NATIVE_GDAL_PYTHON_INSTALL_PREFIX}\"")
+    endif ()
     set(IGNORE_CMAKE_INSTALL_PREFIX_CONFIGURE_TIME_DIFFERENT_FROM_RUNTIME TRUE)
   elseif (CMAKE_INSTALL_PREFIX)
     if (WIN32 AND _isMultiConfig)
       file(TO_NATIVE_PATH "${CMAKE_INSTALL_PREFIX}" NATIVE_CMAKE_INSTALL_PREFIX)
       string(REPLACE "\\" "\\\\" NATIVE_CMAKE_INSTALL_PREFIX "${NATIVE_CMAKE_INSTALL_PREFIX}")
-      set(INSTALL_ARGS "${INSTALL_ARGS} \"--prefix=${NATIVE_CMAKE_INSTALL_PREFIX}\"")
+      if (MINGW)
+        set(INSTALL_ARGS "${INSTALL_ARGS} \"--prefix=${CMAKE_INSTALL_PREFIX}\"")
+      else ()
+        set(INSTALL_ARGS "${INSTALL_ARGS} \"--prefix=${NATIVE_CMAKE_INSTALL_PREFIX}\"")
+      endif ()
       set(IGNORE_CMAKE_INSTALL_PREFIX_CONFIGURE_TIME_DIFFERENT_FROM_RUNTIME TRUE)
     elseif (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
       file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/is_std_unix_layout.py
--- a/swig/python/install_python.cmake.in
+++ b/swig/python/install_python.cmake.in
@@ -4,11 +4,7 @@
   set(ROOT_DIR_ARG "--root=$ENV{DESTDIR}")
 endif()
 if(@CAN_USE_CMAKE_INSTALL_PREFIX_FROM_CMAKE_INSTALL@)
-    file(TO_NATIVE_PATH "${CMAKE_INSTALL_PREFIX}" NATIVE_CMAKE_INSTALL_PREFIX)
-    if (WIN32)
-      string(REPLACE "\\" "\\\\" NATIVE_CMAKE_INSTALL_PREFIX "${NATIVE_CMAKE_INSTALL_PREFIX}")
-    endif ()
-    set(INSTALL_PREFIX "--prefix=${NATIVE_CMAKE_INSTALL_PREFIX}")
+    set(INSTALL_PREFIX "--prefix=${CMAKE_INSTALL_PREFIX}")
 elseif( NOT @IGNORE_CMAKE_INSTALL_PREFIX_CONFIGURE_TIME_DIFFERENT_FROM_RUNTIME@ )
     if(NOT "@CMAKE_INSTALL_PREFIX@" STREQUAL "${CMAKE_INSTALL_PREFIX}")
        message(FATAL_ERROR "CMAKE_INSTALL_PREFIX passed at configuration time (@CMAKE_INSTALL_PREFIX@) is different from the one provided at cmake --install time (${CMAKE_INSTALL_PREFIX})")
