  endif()
  if(CURL_WINDOWS_SSPI)
    set(USE_WINDOWS_SSPI ON)
-@@ -380,6 +380,20 @@ if(USE_NGHTTP2)
-   find_package(NGHTTP2 REQUIRED)
-   include_directories(${NGHTTP2_INCLUDE_DIRS})
-   list(APPEND CURL_LIBS ${NGHTTP2_LIBRARIES})
-+  if(NOT BUILD_SHARED_LIBS)
-+    add_definitions(-DNGHTTP2_STATICLIB)
-+    set(CompilerFlags
-+        CMAKE_CXX_FLAGS
-+        CMAKE_CXX_FLAGS_DEBUG
-+        CMAKE_CXX_FLAGS_RELEASE
-+        CMAKE_C_FLAGS
-+        CMAKE_C_FLAGS_DEBUG
-+        CMAKE_C_FLAGS_RELEASE
-+    )
-+    foreach(CompilerFlag ${CompilerFlags})
-+        string(REPLACE "/MD" "/MT" ${CompilerFlag} "${${CompilerFlag}}")
-+    endforeach()
-+  endif()
- endif()
- 
- if(NOT CURL_DISABLE_LDAP)
-@@ -513,16 +527,24 @@ if(CURL_ZLIB)
+@@ -530,16 +530,24 @@ if(CURL_ZLIB)
  endif()
  
  option(CURL_BROTLI "Set to ON to enable building curl with brotli support." OFF)

 
 #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

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