diff --git a/CMakeLists.txt b/CMakeLists.txt index 56ffea8d75..fc2b679214 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -153,6 +153,10 @@ else() MbedTLS::mbedcrypto MbedTLS::mbedx509) endif() +target_compile_definitions(LIB_LIEF PRIVATE + -DMBEDTLS_CONFIG_FILE="${CMAKE_CURRENT_SOURCE_DIR}/config/mbedtls/config.h" +) + if(WIN32 AND BUILD_SHARED_LIBS) target_link_libraries(LIB_LIEF PRIVATE ws2_32) endif() diff --git a/config/mbedtls/config.h b/config/mbedtls/config.h new file mode 100644 index 0000000000..1007c99aee --- /dev/null +++ b/config/mbedtls/config.h @@ -0,0 +1,5 @@ +#include "mbedtls/mbedtls_config.h" + +#if defined (MBEDTLS_ARCH_IS_X86) +#undef MBEDTLS_AESNI_C +#endif