libimhex needs nlohmann json too

This commit is contained in:
WerWolv 2021-01-11 21:51:52 +01:00
parent bdd2f51497
commit 81652e3650
2 changed files with 5 additions and 4 deletions

View File

@ -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)

View File

@ -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)