mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
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.
This commit is contained in:
parent
058a869b70
commit
4503b5097f
11 changed files with 13 additions and 8 deletions
|
@ -20,8 +20,8 @@ endif()
|
|||
|
||||
if(NOT JSONCPP_FOUND)
|
||||
message(STATUS "Using bundled JSONCPP library.")
|
||||
set(JSON_INCLUDE_DIR ${PROJECT_SOURCE_DIR}/json)
|
||||
set(JSON_INCLUDE_DIR ${PROJECT_SOURCE_DIR}/jsoncpp)
|
||||
set(JSON_LIBRARY jsoncpp)
|
||||
add_subdirectory(json)
|
||||
add_subdirectory(jsoncpp/json)
|
||||
endif()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue