1
0
mirror of synced 2024-11-13 18:50:53 +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 \ libmagic-dev \
libssl-dev \ libssl-dev \
libcapstone-dev \ libcapstone-dev \
nlohmann-json3-dev \
python3-dev \ python3-dev \
libfreetype-dev \ libfreetype-dev \
@ -85,7 +84,6 @@ jobs:
mingw-w64-${{ matrix.arch }}-glfw mingw-w64-${{ matrix.arch }}-glfw
mingw-w64-${{ matrix.arch }}-glm mingw-w64-${{ matrix.arch }}-glm
mingw-w64-${{ matrix.arch }}-file mingw-w64-${{ matrix.arch }}-file
mingw-w64-${{ matrix.arch }}-nlohmann-json
mingw-w64-${{ matrix.arch }}-openssl mingw-w64-${{ matrix.arch }}-openssl
mingw-w64-${{ matrix.arch }}-polly mingw-w64-${{ matrix.arch }}-polly
mingw-w64-${{ matrix.arch }}-python mingw-w64-${{ matrix.arch }}-python

View File

@ -36,10 +36,10 @@ if(NOT CRYPTO_FOUND)
endif() endif()
pkg_search_module(CAPSTONE REQUIRED capstone) pkg_search_module(CAPSTONE REQUIRED capstone)
find_package(OpenGL REQUIRED) find_package(OpenGL REQUIRED)
find_package(nlohmann_json REQUIRED)
find_package(Python COMPONENTS Development) find_package(Python COMPONENTS Development)
add_subdirectory(external/llvm) add_subdirectory(external/llvm)
add_subdirectory(external/nlohmann_json)
add_subdirectory(plugins/libimhex) 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}) target_link_directories(imhex PRIVATE ${CRYPTO_LIBRARY_DIRS} ${CAPSTONE_LIBRARY_DIRS} ${MAGIC_LIBRARY_DIRS})
if (WIN32) 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) 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() endif()
if (WIN32) if (WIN32)

1
dist/Brewfile vendored
View File

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

View File

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

View File

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

View File

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

View File

@ -8,7 +8,6 @@ pacman -S --needed \
mingw-w64-x86_64-glfw \ mingw-w64-x86_64-glfw \
mingw-w64-x86_64-glm \ mingw-w64-x86_64-glm \
mingw-w64-x86_64-file \ mingw-w64-x86_64-file \
mingw-w64-x86_64-nlohmann-json \
mingw-w64-x86_64-openssl \ mingw-w64-x86_64-openssl \
mingw-w64-x86_64-polly \ mingw-w64-x86_64-polly \
mingw-w64-x86_64-python \ 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}-glfw"
"${MINGW_PACKAGE_PREFIX}-glm" "${MINGW_PACKAGE_PREFIX}-glm"
"${MINGW_PACKAGE_PREFIX}-file" "${MINGW_PACKAGE_PREFIX}-file"
"${MINGW_PACKAGE_PREFIX}-nlohmann-json"
"${MINGW_PACKAGE_PREFIX}-openssl" "${MINGW_PACKAGE_PREFIX}-openssl"
"${MINGW_PACKAGE_PREFIX}-polly" "${MINGW_PACKAGE_PREFIX}-polly"
"${MINGW_PACKAGE_PREFIX}-python" "${MINGW_PACKAGE_PREFIX}-python"

View File

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