diff options
author | ichenq <ichenq@gmail.com> | 2014-12-23 10:32:49 +0300 |
---|---|---|
committer | Mark Pulford <mark@kyne.com.au> | 2016-08-24 14:34:50 +0300 |
commit | 7d9d5a6a1fba1a704a6db5377d3e22bdf9ad580c (patch) | |
tree | 5dc9da638c6bc9a46eae46f2682659f44b088d70 | |
parent | 5254f358655e2a6ab55a5c85dd1302c7fcf06fc9 (diff) |
Work around MSVC's C99 support
inline ==> __inline
snprintf ==> _snprintf
strncasecmp ==> _strnicmp
-rw-r--r-- | CMakeLists.txt | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index c17239b..ca26381 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -68,6 +68,13 @@ else() set(_lua_module_dir "${_lua_lib_dir}/lua/5.1") endif() +if(MSVC) + add_definitions(-D_CRT_SECURE_NO_WARNINGS) + add_definitions(-Dinline=__inline) + add_definitions(-Dsnprintf=_snprintf) + add_definitions(-Dstrncasecmp=_strnicmp) +endif() + add_library(cjson MODULE lua_cjson.c strbuf.c ${FPCONV_SOURCES}) set_target_properties(cjson PROPERTIES PREFIX "") target_link_libraries(cjson ${_MODULE_LINK}) |