Skip to content
Permalink
Browse files

Update embedded jsoncpp from unk version to 0.10.6 + move libs to lib…

…/ instead of src/ (#5473)

* Update embedded jsoncpp from unk version to 0.10.6

0.10.6 is last release without c++11

* Make jsoncpp more compliant with its amalgamate

Jsoncpp cpp file should be upper, make the library like it does in amalgamate

* Reorganization: move minetest embedded libs outside of source tree to /lib

* Fix a dead grep in LINT
  • Loading branch information...
nerzhul committed Apr 2, 2017
1 parent 75fb3e4 commit 86b1542181a92841d174e1caec94d084a34e5158
Showing with 6,986 additions and 6,345 deletions.
  1. +1 −0 CMakeLists.txt
  2. +33 −33 build/android/jni/Android.mk
  3. +5 −3 cmake/Modules/FindGMP.cmake
  4. +3 −4 cmake/Modules/FindJson.cmake
  5. +23 −0 lib/CMakeLists.txt
  6. 0 {src → lib}/gmp/CMakeLists.txt
  7. 0 {src → lib}/gmp/mini-gmp.c
  8. 0 {src → lib}/gmp/mini-gmp.h
  9. 0 {src/jsoncpp/json → lib/jsoncpp}/CMakeLists.txt
  10. 0 {src → lib}/jsoncpp/json/UPDATING
  11. +1,981 −0 lib/jsoncpp/json/json.h
  12. +4,937 −0 lib/jsoncpp/jsoncpp.cpp
  13. 0 {src → lib}/lua/CMakeLists.txt
  14. 0 {src → lib}/lua/COPYRIGHT
  15. 0 {src → lib}/lua/src/CMakeLists.txt
  16. 0 {src → lib}/lua/src/lapi.c
  17. 0 {src → lib}/lua/src/lapi.h
  18. 0 {src → lib}/lua/src/lauxlib.c
  19. 0 {src → lib}/lua/src/lauxlib.h
  20. 0 {src → lib}/lua/src/lbaselib.c
  21. 0 {src → lib}/lua/src/lcode.c
  22. 0 {src → lib}/lua/src/lcode.h
  23. 0 {src → lib}/lua/src/ldblib.c
  24. 0 {src → lib}/lua/src/ldebug.c
  25. 0 {src → lib}/lua/src/ldebug.h
  26. 0 {src → lib}/lua/src/ldo.c
  27. 0 {src → lib}/lua/src/ldo.h
  28. 0 {src → lib}/lua/src/ldump.c
  29. 0 {src → lib}/lua/src/lfunc.c
  30. 0 {src → lib}/lua/src/lfunc.h
  31. 0 {src → lib}/lua/src/lgc.c
  32. 0 {src → lib}/lua/src/lgc.h
  33. 0 {src → lib}/lua/src/linit.c
  34. 0 {src → lib}/lua/src/liolib.c
  35. 0 {src → lib}/lua/src/llex.c
  36. 0 {src → lib}/lua/src/llex.h
  37. 0 {src → lib}/lua/src/llimits.h
  38. 0 {src → lib}/lua/src/lmathlib.c
  39. 0 {src → lib}/lua/src/lmem.c
  40. 0 {src → lib}/lua/src/lmem.h
  41. 0 {src → lib}/lua/src/loadlib.c
  42. 0 {src → lib}/lua/src/lobject.c
  43. 0 {src → lib}/lua/src/lobject.h
  44. 0 {src → lib}/lua/src/lopcodes.c
  45. 0 {src → lib}/lua/src/lopcodes.h
  46. 0 {src → lib}/lua/src/loslib.c
  47. 0 {src → lib}/lua/src/lparser.c
  48. 0 {src → lib}/lua/src/lparser.h
  49. 0 {src → lib}/lua/src/lstate.c
  50. 0 {src → lib}/lua/src/lstate.h
  51. 0 {src → lib}/lua/src/lstring.c
  52. 0 {src → lib}/lua/src/lstring.h
  53. 0 {src → lib}/lua/src/lstrlib.c
  54. 0 {src → lib}/lua/src/ltable.c
  55. 0 {src → lib}/lua/src/ltable.h
  56. 0 {src → lib}/lua/src/ltablib.c
  57. 0 {src → lib}/lua/src/ltm.c
  58. 0 {src → lib}/lua/src/ltm.h
  59. 0 {src → lib}/lua/src/lua.c
  60. 0 {src → lib}/lua/src/lua.h
  61. 0 {src → lib}/lua/src/luac.c
  62. 0 {src → lib}/lua/src/luaconf.h
  63. 0 {src → lib}/lua/src/lualib.h
  64. 0 {src → lib}/lua/src/lundump.c
  65. 0 {src → lib}/lua/src/lundump.h
  66. 0 {src → lib}/lua/src/lvm.c
  67. 0 {src → lib}/lua/src/lvm.h
  68. 0 {src → lib}/lua/src/lzio.c
  69. 0 {src → lib}/lua/src/lzio.h
  70. 0 {src → lib}/lua/src/print.c
  71. +0 −21 src/CMakeLists.txt
  72. +0 −1,914 src/jsoncpp/json/json.h
  73. +0 −4,367 src/jsoncpp/json/jsoncpp.cpp
  74. +1 −1 src/util/srp.cpp
  75. +2 −2 util/travis/script.sh
@@ -191,6 +191,7 @@ endif()
# Subdirectories
# Be sure to add all relevant definitions above this

add_subdirectory(lib)
add_subdirectory(src)


@@ -98,8 +98,8 @@ endif
LOCAL_C_INCLUDES := \
jni/src \
jni/src/script \
jni/src/lua/src \
jni/src/jsoncpp \
jni/lib/lua/src \
jni/lib/jsoncpp \
jni/src/cguittfont \
deps/irrlicht/include \
deps/libiconv/include \
@@ -335,36 +335,36 @@ LOCAL_SRC_FILES += jni/src/cguittfont/xCGUITTFont.cpp

# Lua
LOCAL_SRC_FILES += \
jni/src/lua/src/lapi.c \
jni/src/lua/src/lauxlib.c \
jni/src/lua/src/lbaselib.c \
jni/src/lua/src/lcode.c \
jni/src/lua/src/ldblib.c \
jni/src/lua/src/ldebug.c \
jni/src/lua/src/ldo.c \
jni/src/lua/src/ldump.c \
jni/src/lua/src/lfunc.c \
jni/src/lua/src/lgc.c \
jni/src/lua/src/linit.c \
jni/src/lua/src/liolib.c \
jni/src/lua/src/llex.c \
jni/src/lua/src/lmathlib.c \
jni/src/lua/src/lmem.c \
jni/src/lua/src/loadlib.c \
jni/src/lua/src/lobject.c \
jni/src/lua/src/lopcodes.c \
jni/src/lua/src/loslib.c \
jni/src/lua/src/lparser.c \
jni/src/lua/src/lstate.c \
jni/src/lua/src/lstring.c \
jni/src/lua/src/lstrlib.c \
jni/src/lua/src/ltable.c \
jni/src/lua/src/ltablib.c \
jni/src/lua/src/ltm.c \
jni/src/lua/src/lundump.c \
jni/src/lua/src/lvm.c \
jni/src/lua/src/lzio.c \
jni/src/lua/src/print.c
jni/lib/lua/src/lapi.c \
jni/lib/lua/src/lauxlib.c \
jni/lib/lua/src/lbaselib.c \
jni/lib/lua/src/lcode.c \
jni/lib/lua/src/ldblib.c \
jni/lib/lua/src/ldebug.c \
jni/lib/lua/src/ldo.c \
jni/lib/lua/src/ldump.c \
jni/lib/lua/src/lfunc.c \
jni/lib/lua/src/lgc.c \
jni/lib/lua/src/linit.c \
jni/lib/lua/src/liolib.c \
jni/lib/lua/src/llex.c \
jni/lib/lua/src/lmathlib.c \
jni/lib/lua/src/lmem.c \
jni/lib/lua/src/loadlib.c \
jni/lib/lua/src/lobject.c \
jni/lib/lua/src/lopcodes.c \
jni/lib/lua/src/loslib.c \
jni/lib/lua/src/lparser.c \
jni/lib/lua/src/lstate.c \
jni/lib/lua/src/lstring.c \
jni/lib/lua/src/lstrlib.c \
jni/lib/lua/src/ltable.c \
jni/lib/lua/src/ltablib.c \
jni/lib/lua/src/ltm.c \
jni/lib/lua/src/lundump.c \
jni/lib/lua/src/lvm.c \
jni/lib/lua/src/lzio.c \
jni/lib/lua/src/print.c

# SQLite3
LOCAL_SRC_FILES += deps/sqlite/sqlite3.c
@@ -377,7 +377,7 @@ LOCAL_SRC_FILES += \
jni/src/threading/thread.cpp

# JSONCPP
LOCAL_SRC_FILES += jni/src/jsoncpp/json/jsoncpp.cpp
LOCAL_SRC_FILES += jni/lib/jsoncpp/jsoncpp.cpp

LOCAL_SHARED_LIBRARIES := iconv openal ogg vorbis gmp
LOCAL_STATIC_LIBRARIES := Irrlicht freetype curl ssl crypto android_native_app_glue $(PROFILER_LIBS)
@@ -1,7 +1,6 @@

option(ENABLE_SYSTEM_GMP "Use GMP from system" TRUE)
mark_as_advanced(GMP_LIBRARY GMP_INCLUDE_DIR)
set(USE_SYSTEM_GMP FALSE)
set(USE_SYSTEM_GMP FALSE PARENT_SCOPE)

if(ENABLE_SYSTEM_GMP)
find_library(GMP_LIBRARY NAMES libgmp.so)
@@ -10,6 +9,7 @@ if(ENABLE_SYSTEM_GMP)
if(GMP_LIBRARY AND GMP_INCLUDE_DIR)
message (STATUS "Using GMP provided by system.")
set(USE_SYSTEM_GMP TRUE)
set(USE_SYSTEM_GMP TRUE PARENT_SCOPE)
else()
message (STATUS "Detecting GMP from system failed.")
endif()
@@ -19,8 +19,10 @@ endif()

if(NOT USE_SYSTEM_GMP)
message(STATUS "Using bundled mini-gmp library.")
set(GMP_INCLUDE_DIR ${PROJECT_SOURCE_DIR}/gmp)
set(GMP_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/gmp)
set(GMP_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/gmp PARENT_SCOPE)
set(GMP_LIBRARY gmp)
set(GMP_LIBRARY gmp PARENT_SCOPE)
add_subdirectory(gmp)
endif()

@@ -20,8 +20,7 @@ endif()

if(NOT JSONCPP_FOUND)
message(STATUS "Using bundled JSONCPP library.")
set(JSON_INCLUDE_DIR ${PROJECT_SOURCE_DIR}/jsoncpp)
set(JSON_LIBRARY jsoncpp)
add_subdirectory(jsoncpp/json)
set(JSON_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/jsoncpp PARENT_SCOPE)
set(JSON_LIBRARY jsoncpp PARENT_SCOPE)
add_subdirectory(jsoncpp)
endif()

@@ -0,0 +1,23 @@
# LuaJIT
option(ENABLE_LUAJIT "Enable LuaJIT support" TRUE)
set(USE_LUAJIT FALSE PARENT_SCOPE)
if(ENABLE_LUAJIT)
find_package(LuaJIT)
if(LUAJIT_FOUND)
set(USE_LUAJIT TRUE)
set(USE_LUAJIT TRUE PARENT_SCOPE)
message (STATUS "Using LuaJIT provided by system.")
endif(LUAJIT_FOUND)
else()
message (STATUS "LuaJIT detection disabled! (ENABLE_LUAJIT=0)")
endif()

if(NOT USE_LUAJIT)
message(STATUS "LuaJIT not found, using bundled Lua.")
set(LUA_LIBRARY lua PARENT_SCOPE)
set(LUA_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/lua/src PARENT_SCOPE)
add_subdirectory(lua)
endif()

find_package(GMP REQUIRED)
find_package(Json REQUIRED)
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Oops, something went wrong.

0 comments on commit 86b1542

Please sign in to comment.
You can’t perform that action at this time.