mirror of https://github.com/zeldaret/tmc.git
moved asset_processor to new location
This commit is contained in:
parent
47a3e614a0
commit
bc4a8577f3
|
@ -39,3 +39,5 @@ if (${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU")
|
|||
target_link_libraries(filesystem INTERFACE stdc++fs)
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
add_subdirectory(src)
|
||||
|
|
|
@ -1,2 +0,0 @@
|
|||
asset_processor
|
||||
build/
|
|
@ -1,39 +0,0 @@
|
|||
|
||||
CXX = g++
|
||||
CXXFLAGS = -O3 -Wall -Wextra -Werror -std=c++17
|
||||
#CXXFLAGS += -g # debug
|
||||
|
||||
BUILD_FOLDER = build
|
||||
|
||||
SRCS = $(wildcard *.cpp)
|
||||
SRCS += $(wildcard assets/*.cpp)
|
||||
|
||||
OBJS := $(patsubst %.cpp,$(BUILD_FOLDER)/%.o,$(SRCS))
|
||||
|
||||
INCLUDES = -I./
|
||||
|
||||
LIB :=
|
||||
ifneq ($(shell uname -s),Darwin)
|
||||
LIB += +lc++fs
|
||||
endif
|
||||
|
||||
# Create build dirs
|
||||
$(shell mkdir -p $(dir $(OBJS)) >/dev/null)
|
||||
|
||||
.PHONY: all clean
|
||||
|
||||
all: asset_processor
|
||||
|
||||
asset_processor: $(OBJS)
|
||||
$(CXX) -o asset_processor $(OBJS) $(LIB)
|
||||
|
||||
$(BUILD_FOLDER)/%.o: %.cpp
|
||||
$(CXX) $(CXXFLAGS) $(INCLUDES) -c -o $@ $<
|
||||
|
||||
clean:
|
||||
$(RM) asset_processor asset_processor.exe
|
||||
$(RM) -r $(BUILD_FOLDER)
|
||||
|
||||
# Automatic dependencies
|
||||
CXXFLAGS += -MMD
|
||||
-include $(OBJS:.o=.d)
|
File diff suppressed because it is too large
Load Diff
|
@ -1,78 +0,0 @@
|
|||
#ifndef INCLUDE_NLOHMANN_JSON_FWD_HPP_
|
||||
#define INCLUDE_NLOHMANN_JSON_FWD_HPP_
|
||||
|
||||
#include <cstdint> // int64_t, uint64_t
|
||||
#include <map> // map
|
||||
#include <memory> // allocator
|
||||
#include <string> // string
|
||||
#include <vector> // vector
|
||||
|
||||
/*!
|
||||
@brief namespace for Niels Lohmann
|
||||
@see https://github.com/nlohmann
|
||||
@since version 1.0.0
|
||||
*/
|
||||
namespace nlohmann
|
||||
{
|
||||
/*!
|
||||
@brief default JSONSerializer template argument
|
||||
|
||||
This serializer ignores the template arguments and uses ADL
|
||||
([argument-dependent lookup](https://en.cppreference.com/w/cpp/language/adl))
|
||||
for serialization.
|
||||
*/
|
||||
template<typename T = void, typename SFINAE = void>
|
||||
struct adl_serializer;
|
||||
|
||||
template<template<typename U, typename V, typename... Args> class ObjectType =
|
||||
std::map,
|
||||
template<typename U, typename... Args> class ArrayType = std::vector,
|
||||
class StringType = std::string, class BooleanType = bool,
|
||||
class NumberIntegerType = std::int64_t,
|
||||
class NumberUnsignedType = std::uint64_t,
|
||||
class NumberFloatType = double,
|
||||
template<typename U> class AllocatorType = std::allocator,
|
||||
template<typename T, typename SFINAE = void> class JSONSerializer =
|
||||
adl_serializer,
|
||||
class BinaryType = std::vector<std::uint8_t>>
|
||||
class basic_json;
|
||||
|
||||
/*!
|
||||
@brief JSON Pointer
|
||||
|
||||
A JSON pointer defines a string syntax for identifying a specific value
|
||||
within a JSON document. It can be used with functions `at` and
|
||||
`operator[]`. Furthermore, JSON pointers are the base for JSON patches.
|
||||
|
||||
@sa [RFC 6901](https://tools.ietf.org/html/rfc6901)
|
||||
|
||||
@since version 2.0.0
|
||||
*/
|
||||
template<typename BasicJsonType>
|
||||
class json_pointer;
|
||||
|
||||
/*!
|
||||
@brief default JSON class
|
||||
|
||||
This type is the default specialization of the @ref basic_json class which
|
||||
uses the standard template types.
|
||||
|
||||
@since version 1.0.0
|
||||
*/
|
||||
using json = basic_json<>;
|
||||
|
||||
template<class Key, class T, class IgnoredLess, class Allocator>
|
||||
struct ordered_map;
|
||||
|
||||
/*!
|
||||
@brief ordered JSON class
|
||||
|
||||
This type preserves the insertion order of object keys.
|
||||
|
||||
@since version 3.9.0
|
||||
*/
|
||||
using ordered_json = basic_json<nlohmann::ordered_map>;
|
||||
|
||||
} // namespace nlohmann
|
||||
|
||||
#endif // INCLUDE_NLOHMANN_JSON_FWD_HPP_
|
|
@ -0,0 +1 @@
|
|||
add_subdirectory(asset_processor)
|
|
@ -0,0 +1,5 @@
|
|||
file(GLOB_RECURSE sources *.cpp)
|
||||
|
||||
add_executable(asset_processor ${sources})
|
||||
target_include_directories(asset_processor PRIVATE .)
|
||||
target_link_libraries(asset_processor PRIVATE nlohmann_json::nlohmann_json filesystem)
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
#include "util.h"
|
||||
#include <filesystem>
|
||||
#include <json_fwd.hpp>
|
||||
#include <nlohmann/json_fwd.hpp>
|
||||
#include <string>
|
||||
#include <iostream>
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
#include "gfx.h"
|
||||
#include "util.h"
|
||||
#include <json.hpp>
|
||||
#include <nlohmann/json.hpp>
|
||||
|
||||
std::filesystem::path GfxAsset::generateAssetPath() {
|
||||
std::filesystem::path pngPath = this->path;
|
|
@ -4,7 +4,7 @@
|
|||
#include <filesystem>
|
||||
#include <iostream>
|
||||
#include <fstream>
|
||||
#include <json.hpp>
|
||||
#include <nlohmann/json.hpp>
|
||||
|
||||
extern std::string gBaseromPath;
|
||||
|
|
@ -12,7 +12,7 @@
|
|||
#include <filesystem>
|
||||
#include <fstream>
|
||||
#include <iostream>
|
||||
#include <json.hpp>
|
||||
#include <nlohmann/json.hpp>
|
||||
|
||||
using nlohmann::json;
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef UTIL_H
|
||||
#define UTIL_H
|
||||
|
||||
#include <json_fwd.hpp>
|
||||
#include <nlohmann/json_fwd.hpp>
|
||||
#include <memory>
|
||||
#include <stdexcept>
|
||||
#include <stdint.h>
|
Loading…
Reference in New Issue