1
0
mirror of synced 2024-11-12 02:00:52 +01:00

Added nlohmann json to imhex directly

Once again Ubuntu is fucking outdated by over a year for literally no reason. Fuck this
This commit is contained in:
WerWolv 2021-01-11 21:42:21 +01:00
parent e27993aff2
commit 688e921034
11 changed files with 25460 additions and 11 deletions

View File

@ -34,7 +34,6 @@ jobs:
libmagic-dev \
libssl-dev \
libcapstone-dev \
nlohmann-json3-dev \
python3-dev \
libfreetype-dev \
@ -85,7 +84,6 @@ jobs:
mingw-w64-${{ matrix.arch }}-glfw
mingw-w64-${{ matrix.arch }}-glm
mingw-w64-${{ matrix.arch }}-file
mingw-w64-${{ matrix.arch }}-nlohmann-json
mingw-w64-${{ matrix.arch }}-openssl
mingw-w64-${{ matrix.arch }}-polly
mingw-w64-${{ matrix.arch }}-python

View File

@ -36,10 +36,10 @@ if(NOT CRYPTO_FOUND)
endif()
pkg_search_module(CAPSTONE REQUIRED capstone)
find_package(OpenGL REQUIRED)
find_package(nlohmann_json REQUIRED)
find_package(Python COMPONENTS Development)
add_subdirectory(external/llvm)
add_subdirectory(external/nlohmann_json)
add_subdirectory(plugins/libimhex)
@ -186,9 +186,9 @@ set_target_properties(imhex PROPERTIES CXX_VISIBILITY_PRESET hidden)
target_link_directories(imhex PRIVATE ${CRYPTO_LIBRARY_DIRS} ${CAPSTONE_LIBRARY_DIRS} ${MAGIC_LIBRARY_DIRS})
if (WIN32)
target_link_libraries(imhex libdl.a libmagic.a libgnurx.a libtre.a libintl.a libiconv.a libshlwapi.a libcrypto.a libwinpthread.a libcapstone.a LLVMDemangle imgui libimhex ${Python_LIBRARIES} nlohmann_json::nlohmann_json)
target_link_libraries(imhex libdl.a libmagic.a libgnurx.a libtre.a libintl.a libiconv.a libshlwapi.a libcrypto.a libwinpthread.a libcapstone.a LLVMDemangle imgui libimhex ${Python_LIBRARIES} nlohmann_json)
elseif (UNIX)
target_link_libraries(imhex magic crypto ${CMAKE_DL_LIBS} capstone LLVMDemangle imgui libimhex ${Python_LIBRARIES} nlohmann_json::nlohmann_json dl)
target_link_libraries(imhex magic crypto ${CMAKE_DL_LIBS} capstone LLVMDemangle imgui libimhex ${Python_LIBRARIES} nlohmann_json dl)
endif()
if (WIN32)

1
dist/Brewfile vendored
View File

@ -1,7 +1,6 @@
brew "glfw3"
brew "openssl@1.1"
brew "capstone"
brew "nlohmann-json"
brew "glm"
brew "cmake"
brew "python3"

View File

@ -7,7 +7,6 @@ pacman -S --needed \
file \
openssl \
capstone \
nlohmann-json \
glm \
python3 \
freetype2

View File

@ -14,7 +14,6 @@ apt install \
cmake \
g++-10 \
${PKGCONF:-} \
nlohmann-json3-dev \
libcapstone-dev \
libmagic-dev \
libglfw3-dev \

View File

@ -7,7 +7,6 @@ dnf install \
file-devel \
glfw-devel \
glm-devel \
json-devel \
mesa-libGL-devel \
openssl-devel \
python-devel \

View File

@ -8,7 +8,6 @@ pacman -S --needed \
mingw-w64-x86_64-glfw \
mingw-w64-x86_64-glm \
mingw-w64-x86_64-file \
mingw-w64-x86_64-nlohmann-json \
mingw-w64-x86_64-openssl \
mingw-w64-x86_64-polly \
mingw-w64-x86_64-python \

8
external/nlohmann_json/CMakeLists.txt vendored Normal file
View File

@ -0,0 +1,8 @@
cmake_minimum_required(VERSION 3.16)
project(nlohmann_json)
set(CMAKE_CXX_STANDARD 17)
add_library(nlohmann_json INTERFACE)
target_include_directories(nlohmann_json INTERFACE include)

25447
external/nlohmann_json/include/json.hpp vendored Normal file

File diff suppressed because it is too large Load Diff

View File

@ -16,7 +16,6 @@ makedepends=("${MINGW_PACKAGE_PREFIX}-gcc"
"${MINGW_PACKAGE_PREFIX}-glfw"
"${MINGW_PACKAGE_PREFIX}-glm"
"${MINGW_PACKAGE_PREFIX}-file"
"${MINGW_PACKAGE_PREFIX}-nlohmann-json"
"${MINGW_PACKAGE_PREFIX}-openssl"
"${MINGW_PACKAGE_PREFIX}-polly"
"${MINGW_PACKAGE_PREFIX}-python"

View File

@ -35,6 +35,8 @@ namespace hex {
};
struct Events {
Events() = delete;
static auto get(std::string_view name);
};
};