1
0
mirror of synced 2025-01-18 09:04:52 +01:00

build: Link mbedtls to libyara

This commit is contained in:
WerWolv 2021-12-14 21:27:15 +01:00
parent a05d09ffea
commit 0ee4b1e336
2 changed files with 6 additions and 3 deletions

View File

@ -104,6 +104,7 @@ add_compile_definitions("MAGIC_MODULE")
add_compile_definitions("MACHO_MODULE")
add_compile_definitions("DEX_MODULE")
find_package(mbedTLS 2.26.0 REQUIRED)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-shift-count-overflow")
add_library(libyara STATIC ${LIBYARA_SOURCE} ${LIBYARA_INCLUDES} ${LIBYARA_MODULES})
@ -115,10 +116,12 @@ target_include_directories(
PRIVATE ${LIBYARA_SOURCE_PATH} ${MBEDTLS_INCLUDE_DIR}
)
target_link_directories(libyara PRIVATE ${MBEDTLS_LIBRARY_DIR})
if (UNIX)
target_link_libraries(libyara magic pthread)
target_link_libraries(libyara PRIVATE magic ${MBEDTLS_LIBRARIES} pthread)
else ()
target_link_libraries(libyara magic)
target_link_libraries(libyara PRIVATE magic ${MBEDTLS_LIBRARIES})
endif ()
include(GNUInstallDirs)

View File

@ -126,7 +126,7 @@ endif ()
add_library(libimhex SHARED ${LIBIMHEX_SOURCES})
target_include_directories(libimhex PUBLIC include ${MBEDTLS_INCLUDE_DIR} ${XDGPP_INCLUDE_DIRS} ${MBEDTLS_INCLUDE_DIRS} ${CAPSTONE_INCLUDE_DIRS} ${MAGIC_INCLUDE_DIRS} ${Python_INCLUDE_DIRS} ${LLVM_INCLUDE_DIRS} ${FMT_INCLUDE_DIRS} ${CURL_INCLUDE_DIRS} ${YARA_INCLUDE_DIRS})
target_include_directories(libimhex PUBLIC include ${XDGPP_INCLUDE_DIRS} ${MBEDTLS_INCLUDE_DIRS} ${CAPSTONE_INCLUDE_DIRS} ${MAGIC_INCLUDE_DIRS} ${Python_INCLUDE_DIRS} ${LLVM_INCLUDE_DIRS} ${FMT_INCLUDE_DIRS} ${CURL_INCLUDE_DIRS} ${YARA_INCLUDE_DIRS})
target_link_directories(libimhex PUBLIC ${MBEDTLS_LIBRARY_DIR} ${CAPSTONE_LIBRARY_DIRS} ${MAGIC_LIBRARY_DIRS})
if (APPLE)