summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorEric Haszlakiewicz <erh+git@nimenees.com>2020-06-07 03:36:59 +0000
committerEric Haszlakiewicz <erh+git@nimenees.com>2020-06-07 03:36:59 +0000
commiteab1375123d0ae1344dcfbfa80c6913b72803a13 (patch)
treeaff894acacfbeb837ff8cc812cf7eee3a70c3fd3 /CMakeLists.txt
parentb0466b626be8075280ac69b6d63fe747955357e0 (diff)
downloadjson-c-eab1375123d0ae1344dcfbfa80c6913b72803a13.tar.gz
Change CMakeLists.txt to look for SSIZE_T on MSVC too.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt5
1 files changed, 5 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 16d1336..1c0dd85 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -205,7 +205,12 @@ check_type_size(int64_t SIZEOF_INT64_T)
check_type_size(long SIZEOF_LONG)
check_type_size("long long" SIZEOF_LONG_LONG)
check_type_size("size_t" SIZEOF_SIZE_T)
+if ("${CMAKE_C_COMPILER_ID}" STREQUAL "MSVC")
+list(APPEND CMAKE_EXTRA_INCLUDE_FILES BaseTsd.h)
+check_type_size("SSIZE_T" SIZEOF_SIZE_T)
+else()
check_type_size("ssize_t" SIZEOF_SSIZE_T)
+endif()
check_c_source_compiles(
[=[