- New CMake based build system. Based in part on contribution from
Igor Okulist and Damien Buhl (Patch #14). Added support for running
tests and building with DLL on Windows.
- added missing JSON_API
- Visual Studio DLL: suppressed warning "C4251: <data member>: <type>
needs to have dll-interface to be used by..." via pragma push/pop
in json-cpp headers.
- New header json/version.h now contains version number macros
(JSONCPP_VERSION_MAJOR, JSONCPP_VERSION_MINOR, JSONCPP_VERSION_PATCH
and JSONCPP_VERSION_HEXA). While this header is generated by CMake,
it is committed to ease build with alternate build system
(CMake only update the file when it changes avoid issues with VCS).
diff --git a/include/json/config.h b/include/json/config.h
index 72437c4..c9b298d 100644
--- a/include/json/config.h
+++ b/include/json/config.h
@@ -46,10 +46,17 @@
# ifdef JSON_IN_CPPTL
# define JSON_API CPPTL_API
# elif defined(JSON_DLL_BUILD)
-# define JSON_API __declspec(dllexport)
+# if defined(_MSC_VER)
+# define JSON_API __declspec(dllexport)
+# define JSONCPP_DISABLE_DLL_INTERFACE_WARNING
+# endif // if defined(_MSC_VER)
# elif defined(JSON_DLL)
-# define JSON_API __declspec(dllimport)
-# else
+# if defined(_MSC_VER)
+# define JSON_API __declspec(dllimport)
+# define JSONCPP_DISABLE_DLL_INTERFACE_WARNING
+# endif // if defined(_MSC_VER)
+# endif // ifdef JSON_IN_CPPTL
+# if !defined(JSON_API)
# define JSON_API
# endif