From 81652e36509cd1472644804ceed06d3d36c6d4c2 Mon Sep 17 00:00:00 2001 From: WerWolv Date: Mon, 11 Jan 2021 21:51:52 +0100 Subject: [PATCH] libimhex needs nlohmann json too --- CMakeLists.txt | 5 ++--- plugins/libimhex/CMakeLists.txt | 4 +++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 94f5b1406..fdb883823 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -39,7 +39,6 @@ find_package(OpenGL REQUIRED) find_package(Python COMPONENTS Development) add_subdirectory(external/llvm) -add_subdirectory(external/nlohmann_json) add_subdirectory(plugins/libimhex) @@ -186,9 +185,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) + 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}) elseif (UNIX) - target_link_libraries(imhex magic crypto ${CMAKE_DL_LIBS} capstone LLVMDemangle imgui libimhex ${Python_LIBRARIES} nlohmann_json dl) + target_link_libraries(imhex magic crypto ${CMAKE_DL_LIBS} capstone LLVMDemangle imgui libimhex ${Python_LIBRARIES} dl) endif() if (WIN32) diff --git a/plugins/libimhex/CMakeLists.txt b/plugins/libimhex/CMakeLists.txt index bdea2a4a6..2fd1308d2 100644 --- a/plugins/libimhex/CMakeLists.txt +++ b/plugins/libimhex/CMakeLists.txt @@ -4,6 +4,8 @@ project(libimhex) set(CMAKE_CXX_STANDARD 20) add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../../external/ImGui ${CMAKE_CURRENT_BINARY_DIR}/external/ImGui) +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../../external/nlohmann_json ${CMAKE_CURRENT_BINARY_DIR}/external/nlohmann_json) + if (WIN32) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -static-libstdc++ -static-libgcc -static") @@ -20,4 +22,4 @@ add_library(libimhex STATIC ) target_include_directories(libimhex PUBLIC include) -target_link_libraries(libimhex PUBLIC imgui) +target_link_libraries(libimhex PUBLIC imgui nlohmann_json)