From 1e241bd24ffb6da27e43e2aaea02dabf18420950 Mon Sep 17 00:00:00 2001 From: GoaLitiuM Date: Mon, 4 May 2015 18:18:24 +0300 Subject: [PATCH] jansson: Fix integer and real value formatting with VS2015 This is related to CRT changes in VS2015. All printf related functions are now defined inline, which breaks the CMake's link time checking. --- deps/jansson/CMakeLists.txt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/deps/jansson/CMakeLists.txt b/deps/jansson/CMakeLists.txt index 41255f27d..194404b0a 100644 --- a/deps/jansson/CMakeLists.txt +++ b/deps/jansson/CMakeLists.txt @@ -80,6 +80,7 @@ include (CheckFunctionExists) include (CheckFunctionKeywords) include (CheckIncludeFiles) include (CheckTypeSize) +include (CheckSymbolExists) if (MSVC) @@ -221,8 +222,8 @@ else (HAVE_INLINE) endif (HAVE_INLINE) # Find our snprintf -check_function_exists (snprintf HAVE_SNPRINTF) -check_function_exists (_snprintf HAVE__SNPRINTF) +check_symbol_exists(snprintf "stdio.h" HAVE_SNPRINTF) +check_symbol_exists(_snprintf "stdio.h" HAVE__SNPRINTF) if (HAVE_SNPRINTF) set (JSON_SNPRINTF snprintf)