Fixes for cmake for MSVC2010
This commit is contained in:
parent
3e03b07831
commit
3d5bea5714
@ -74,14 +74,14 @@ check_type_size (__int32 __INT32)
|
||||
check_type_size ("long" LONG_INT)
|
||||
check_type_size ("int" INT)
|
||||
|
||||
if (HAVE___INT32)
|
||||
if (HAVE_INT32_T)
|
||||
set (JSON_INT32 int32_t)
|
||||
elseif (HAVE___INT32)
|
||||
set (JSON_INT32 __int32)
|
||||
elseif (HAVE_LONG AND (${LONG_INT} EQUAL 4))
|
||||
set (JSON_INT32 long)
|
||||
elseif (HAVE_INT AND (${INT} EQUAL 4))
|
||||
set (JSON_INT32 int)
|
||||
elseif (HAVE_INT32_T)
|
||||
set (JSON_INT32 int32_t)
|
||||
else ()
|
||||
message (FATAL_ERROR "Could not detect a valid 32 bit integer type")
|
||||
endif ()
|
||||
|
@ -1,7 +1,20 @@
|
||||
/* Reduced down to the defines that are actually used in the code */
|
||||
|
||||
/* Define to 1 if you have the <inttypes.h> header file. */
|
||||
/* Define to 1 if you have the <inttypes.h> (and friends) header file. */
|
||||
#cmakedefine HAVE_INTTYPES_H 1
|
||||
#cmakedefine HAVE_STDINT_H 1
|
||||
#cmakedefine HAVE_SYS_TYPES_H 1
|
||||
|
||||
/* We must include this here, as in (eg) utf.h it will want to use
|
||||
the integer type, which in MSVC2010 will be in stdint.h
|
||||
(there is no inttypes.h in MSVC2010) */
|
||||
#if defined(HAVE_STDINT_H)
|
||||
# include <stdint.h>
|
||||
#elif defined(HAVE_INTTYPES_H)
|
||||
# include <inttypes.h>
|
||||
#elif defined(HAVE_SYS_TYPES_H)
|
||||
# include <sys/types.h>
|
||||
#endif
|
||||
|
||||
/* Define to 1 if you have the <locale.h> header file. */
|
||||
#cmakedefine HAVE_LOCALE_H 1
|
||||
|
Loading…
Reference in New Issue
Block a user