Skip to content

Commit

Permalink
Merge branch '193-add-the-new-json-for-modern-c-lib' into 'master'
Browse files Browse the repository at this point in the history
Resolve "Add the new "JSON for Modern C++" lib"

Closes aerys#193

See merge request aerys/smartshape-engine!188
  • Loading branch information
jpx committed Apr 2, 2020
2 parents 2190f20 + d7c5876 commit 3515f5b
Show file tree
Hide file tree
Showing 16 changed files with 23,231 additions and 8,400 deletions.
2 changes: 1 addition & 1 deletion cmake/project.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ function (minko_add_executable target_name sources)
"${MINKO_HOME}/framework/include"
"${MINKO_HOME}/framework/lib/glm"
"${MINKO_HOME}/framework/lib/sparsehash/src"
"${MINKO_HOME}/framework/lib/jsoncpp/src"
"${MINKO_HOME}/framework/lib/jsonmoderncpp"
)

if (WIN32)
Expand Down
11 changes: 4 additions & 7 deletions framework/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,8 @@ file (GLOB_RECURSE FRAMEWORK_SRC
"${CMAKE_CURRENT_SOURCE_DIR}/asset/*"
)

file (GLOB_RECURSE JSON_CPP_SRC
"${CMAKE_CURRENT_SOURCE_DIR}/lib/jsoncpp/src/*.hpp"
"${CMAKE_CURRENT_SOURCE_DIR}/lib/jsoncpp/src/*.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/lib/jsoncpp/src/*.h"
"${CMAKE_CURRENT_SOURCE_DIR}/lib/jsoncpp/src/*.c"
file (GLOB_RECURSE JSON_MODERN_CPP
"${CMAKE_CURRENT_SOURCE_DIR}/lib/jsonmoderncpp/include/nlohmann/*.hpp"
)

file (GLOB_RECURSE GLM_SRC
Expand Down Expand Up @@ -63,7 +60,7 @@ endif ()

list (APPEND
COMMON_SOURCES
${JSON_CPP_SRC}
${JSON_MODERN_CPP}
${GLM_SRC}
${FRAMEWORK_SRC}
${GLEW_SRC}
Expand All @@ -87,7 +84,7 @@ target_include_directories (minko-framework
PUBLIC
"include"
"src"
"lib/jsoncpp/src"
"lib/jsonmoderncpp/include"
"lib/glm"
"lib/sparsehash/src"
)
Expand Down
2 changes: 1 addition & 1 deletion framework/enable.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ function (minko_enable_framework target)
"${MINKO_HOME}/framework/include"
"${MINKO_HOME}/framework/lib/glm"
"${MINKO_HOME}/framework/lib/sparsehash/src"
"${MINKO_HOME}/framework/lib/jsoncpp/src"
"${MINKO_HOME}/framework/lib/jsonmoderncpp/include"
)
if (WIN32)
list (
Expand Down
8 changes: 7 additions & 1 deletion framework/include/minko/file/EffectParser.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ namespace minko
typedef std::unordered_map<LoaderPtr, Signal<LoaderPtr>::Slot> LoaderCompleteSlotMap;
typedef std::unordered_map<LoaderPtr, LoaderErrorSlot> LoaderErrorSlotMap;

typedef minko::file::JSON::Value JSONValue;
typedef minko::file::JSON::json JSONValue;

enum class GLSLBlockType
{
Expand Down Expand Up @@ -420,6 +420,12 @@ namespace minko
ShaderPtr
parseShader(const JSONValue& node, const Scope& scope, render::Shader::Type type);

std::vector<unsigned char>
replaceBreakLine(std::vector<unsigned char> &data);

std::string
undoBreakLine(const std::string &node);

void
parseGLSL(const std::string& glsl,
OptionsPtr options,
Expand Down
4 changes: 2 additions & 2 deletions framework/include/minko/file/JSON.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SO

#pragma once

#include "json/json.h"
#include "nlohmann/json.hpp"

namespace minko
{
namespace file
{
namespace JSON
{
using namespace Json;
using namespace nlohmann;
}
}
}
55 changes: 0 additions & 55 deletions framework/lib/jsoncpp/LICENSE

This file was deleted.

Loading

0 comments on commit 3515f5b

Please sign in to comment.