From 4503b5097f99d2806763650f33d8ef3b49f77ce4 Mon Sep 17 00:00:00 2001 From: Rogier-5 Date: Wed, 10 Aug 2016 12:10:00 +0200 Subject: Fixes for compiling with a newer (system) jsoncpp (#4429) * Move included json code to jsoncpp subdirectory This is needed to avoid having to specify the minetest src directory as a system include when fixing the json includes. * Fix json includes They used "", so that the compiler searches the project's directory first. The result was that when compiling with a system jsoncpp, the project's own version of json.h was still included, instead of the system version. The includes now use <>, so a system location, or one specified with '-Ilocation' is searched only. * Fix for jsoncpp deprecated function warning When compiling with a newer version of jsoncpp (and ENABLE_SYSTEM_JSONCPP=true), jsoncpp emits a warning about a deprecated function that minetest uses. --- src/jsoncpp/json/CMakeLists.txt | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 src/jsoncpp/json/CMakeLists.txt (limited to 'src/jsoncpp/json/CMakeLists.txt') diff --git a/src/jsoncpp/json/CMakeLists.txt b/src/jsoncpp/json/CMakeLists.txt new file mode 100644 index 000000000..9056e4b6d --- /dev/null +++ b/src/jsoncpp/json/CMakeLists.txt @@ -0,0 +1,7 @@ +if(MSVC) + set(CMAKE_CXX_FLAGS_RELEASE "/MT /O2 /Ob2 /D NDEBUG") +endif() + +add_library(jsoncpp jsoncpp.cpp) +target_link_libraries(jsoncpp) + -- cgit v1.2.3