build: Link mbedtls to libyara
This commit is contained in:
parent
a05d09ffea
commit
0ee4b1e336
7
external/yara/CMakeLists.txt
vendored
7
external/yara/CMakeLists.txt
vendored
@ -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)
|
||||
|
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user