aboutsummaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorJoakim Soderberg <joakim.soderberg@gmail.com>2013-03-07 18:38:47 +0100
committerJoakim Soderberg <joakim.soderberg@gmail.com>2013-03-07 18:38:47 +0100
commit650707fcccdafd4ce09b62c6aab4990b5c8dd710 (patch)
treec38bf1b6b5ae20a3ffe58ae326f42df3a07fda19 /cmake
parent33b0855b2729c47177504ba698b7aea1012cd672 (diff)
downloadjansson-650707fcccdafd4ce09b62c6aab4990b5c8dd710.zip
jansson-650707fcccdafd4ce09b62c6aab4990b5c8dd710.tar.gz
jansson-650707fcccdafd4ce09b62c6aab4990b5c8dd710.tar.bz2
Moved *config.h.cmake to the cmake directory.
Diffstat (limited to 'cmake')
-rw-r--r--cmake/config.h.cmake45
-rw-r--r--cmake/jansson_config.h.cmake62
2 files changed, 107 insertions, 0 deletions
diff --git a/cmake/config.h.cmake b/cmake/config.h.cmake
new file mode 100644
index 0000000..bc81178
--- /dev/null
+++ b/cmake/config.h.cmake
@@ -0,0 +1,45 @@
+/* Reduced down to the defines that are actually used in the code */
+
+/* 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
+
+/* Define to 1 if you have the 'setlocale' function. */
+#cmakedefine HAVE_SETLOCALE 1
+
+/* Define to the type of a signed integer type of width exactly 32 bits if
+ such a type exists and the standard includes do not define it. */
+#cmakedefine HAVE_INT32_T 1
+
+#ifndef HAVE_INT32_T
+# define int32_t @JSON_INT32@
+#endif
+
+#cmakedefine HAVE_SSIZE_T 1
+
+#ifndef HAVE_SSIZE_T
+# define ssize_t @JSON_SSIZE@
+#endif
+
+#cmakedefine HAVE_SNPRINTF 1
+
+#ifndef HAVE_SNPRINTF
+# define snprintf @JSON_SNPRINTF@
+#endif
+
+#cmakedefine HAVE_VSNPRINTF
diff --git a/cmake/jansson_config.h.cmake b/cmake/jansson_config.h.cmake
new file mode 100644
index 0000000..335ccc4
--- /dev/null
+++ b/cmake/jansson_config.h.cmake
@@ -0,0 +1,62 @@
+/*
+ * Copyright (c) 2010-2012 Petri Lehtinen <petri@digip.org>
+ *
+ * Jansson is free software; you can redistribute it and/or modify
+ * it under the terms of the MIT license. See LICENSE for details.
+ *
+ *
+ * This file specifies a part of the site-specific configuration for
+ * Jansson, namely those things that affect the public API in
+ * jansson.h.
+ *
+ * The CMake system will generate the jansson_config.h file and
+ * copy it to the build and install directories.
+ */
+
+#ifndef JANSSON_CONFIG_H
+#define JANSSON_CONFIG_H
+
+/* Define this so that we can disable scattered automake configuration in source files */
+#define JANSSON_USING_CMAKE
+
+/* Note: when using cmake, JSON_INTEGER_IS_LONG_LONG is not defined nor used,
+ * as we will also check for __int64 etc types.
+ * (the definition was used in the automake system) */
+
+/* Bring in the cmake-detected defines */
+#cmakedefine HAVE_STDINT_H 1
+#cmakedefine HAVE_INTTYPES_H 1
+#cmakedefine HAVE_SYS_TYPES_H 1
+
+/* Include our standard type header for the integer typedef */
+
+#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
+
+
+/* If your compiler supports the inline keyword in C, JSON_INLINE is
+ defined to `inline', otherwise empty. In C++, the inline is always
+ supported. */
+#ifdef __cplusplus
+#define JSON_INLINE inline
+#else
+#define JSON_INLINE @JSON_INLINE@
+#endif
+
+
+#define json_int_t @JSON_INT_T@
+#define json_strtoint @JSON_STRTOINT@
+#define JSON_INTEGER_FORMAT @JSON_INTEGER_FORMAT@
+
+
+/* If locale.h and localeconv() are available, define to 1, otherwise to 0. */
+#define JSON_HAVE_LOCALECONV @JSON_HAVE_LOCALECONV@
+
+
+
+#endif