  
  if(LIBSSH2_INCLUDE_DIR)
 diff --git a/CMakeLists.txt b/CMakeLists.txt
-index e6dbb73f1..c0e4a5f6e 100644
+index a3c17c452..5b8a3bd24 100644
 --- a/CMakeLists.txt
 +++ b/CMakeLists.txt
 @@ -323,7 +323,7 @@ if(CMAKE_USE_WINSSL)

 
 #libSSH2
 option(CMAKE_USE_LIBSSH2 "Use libSSH2" ON)
@@ -1144,7 +1166,9 @@ function(TRANSFORM_MAKEFILE_INC INPUT_FILE OUTPUT_FILE)
 
 endfunction()
 
-if(WIN32 AND NOT CYGWIN)
+if(MSVC)
+  set(CURL_INSTALL_CMAKE_DIR share/curl)
+elseif(WIN32 AND NOT CYGWIN)
   set(CURL_INSTALL_CMAKE_DIR CMake)
 else()
   set(CURL_INSTALL_CMAKE_DIR lib/cmake/curl)
diff --git a/src/curl.rc b/src/curl.rc
index d47f50635..239918eee 100644
--- a/src/curl.rc

 endif()
 if(CURL_WINDOWS_SSPI)
   set(USE_WINDOWS_SSPI ON)
@@ -530,16 +530,24 @@ if(CURL_ZLIB)
 endif()
 
 option(CURL_BROTLI "Set to ON to enable building curl with brotli support." OFF)
