]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
cmake: pre-fill `HAVE_STDINT_H` on Windows
authorViktor Szakats <commit@vsz.me>
Tue, 7 Jan 2025 10:02:10 +0000 (11:02 +0100)
committerViktor Szakats <commit@vsz.me>
Tue, 7 Jan 2025 14:37:36 +0000 (15:37 +0100)
Closes #15925

CMake/win32-cache.cmake

index 76b0d8c1143e7f4634d548110435d4b4d56eb1bf..cb55b74774d453c7452225f5489aa8174c3f1e63 100644 (file)
@@ -32,6 +32,7 @@ if(MINGW)
   set(HAVE_UNISTD_H 1)
   set(HAVE_LIBGEN_H 1)
   set(HAVE_STDDEF_H 1)  # detected by CMake internally in check_type_size()
+  set(HAVE_STDINT_H 1)  # detected by CMake internally in check_type_size()
   set(HAVE_STDBOOL_H 1)
   set(HAVE_BOOL_T "${HAVE_STDBOOL_H}")
   set(HAVE_STRTOLL 1)
@@ -58,6 +59,11 @@ else()
     set(HAVE_UNISTD_H 0)
     set(HAVE_STDDEF_H 1)  # detected by CMake internally in check_type_size()
     set(HAVE_STDATOMIC_H 0)
+    if(NOT MSVC_VERSION LESS 1600)
+      set(HAVE_STDINT_H 1)  # detected by CMake internally in check_type_size()
+    else()
+      set(HAVE_STDINT_H 0)  # detected by CMake internally in check_type_size()
+    endif()
     if(NOT MSVC_VERSION LESS 1800)
       set(HAVE_STDBOOL_H 1)
       set(HAVE_STRTOLL 1)