diff --git a/external/yara/CMakeLists.txt b/external/yara/CMakeLists.txt index 94e037924..553ab41f2 100644 --- a/external/yara/CMakeLists.txt +++ b/external/yara/CMakeLists.txt @@ -96,7 +96,7 @@ set(LIBYARA_MODULES # Add mbedtls crypto wrappers add_custom_command( OUTPUT ${LIBYARA_SOURCE_PATH}/crypto.h - COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/crypto_mbedtls.h ${LIBYARA_SOURCE_PATH}/crypto.h + COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_CURRENT_SOURCE_DIR}/crypto_mbedtls.h ${LIBYARA_SOURCE_PATH}/crypto.h MAIN_DEPENDENCY ${CMAKE_CURRENT_SOURCE_DIR}/crypto_mbedtls.h) add_compile_definitions("HAVE_MBEDTLS")