Export MatrixSSL AES compiler option to consumers
This commit is contained in:
@@ -333,7 +333,11 @@ function(matrixssl_configure_target target_name)
|
||||
target_compile_definitions(${target_name} PUBLIC MATRIX_CONFIGURATION_INCDIR_FIRST)
|
||||
target_compile_options(${target_name} PRIVATE -ffunction-sections -fdata-sections -fno-math-errno)
|
||||
if(CMAKE_SYSTEM_PROCESSOR MATCHES "^(x86_64|amd64|AMD64|i[3-6]86)$")
|
||||
target_compile_options(${target_name} PRIVATE -maes)
|
||||
# MatrixSSL builds the library with AES enabled on x86 so
|
||||
# PSCRYPTO_CONFIG contains AESNI=Y. Consumers that include
|
||||
# cryptoApi.h must see the same compiler feature macros, otherwise
|
||||
# psCryptoOpen() rejects them with a crypto config mismatch.
|
||||
target_compile_options(${target_name} PUBLIC -maes)
|
||||
endif()
|
||||
if(UNIX AND NOT APPLE)
|
||||
target_link_libraries(${target_name} PUBLIC pthread m)
|
||||
|
||||
Reference in New Issue
Block a user