1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-11-19 05:58:09 +00:00
trezor-firmware/CMakeLists.txt

45 lines
1.7 KiB
CMake
Raw Normal View History

cmake_minimum_required(VERSION 2.8)
2014-07-17 14:59:14 +00:00
2017-07-31 14:44:02 +00:00
set(SOURCES
bignum.c ecdsa.c curves.c secp256k1.c nist256p1.c rand.c hmac.c bip32.c bip39.c pbkdf2.c base58.c base32.c
address.c
script.c
ripemd160.c
sha2.c
sha3.c
2017-12-09 17:59:20 +00:00
hasher.c
2017-07-31 14:44:02 +00:00
aes/aescrypt.c aes/aeskey.c aes/aestab.c aes/aes_modes.c
ed25519-donna/curve25519-donna-32bit.c ed25519-donna/curve25519-donna-helpers.c ed25519-donna/modm-donna-32bit.c
ed25519-donna/ed25519-donna-basepoint-table.c ed25519-donna/ed25519-donna-32bit-tables.c ed25519-donna/ed25519-donna-impl-base.c
ed25519-donna/ed25519.c ed25519-donna/curve25519-donna-scalarmult-base.c ed25519-donna/ed25519-sha3.c ed25519-donna/ed25519-keccak.c
2017-12-09 22:51:16 +00:00
blake256.c
2017-07-31 14:44:02 +00:00
blake2b.c blake2s.c
chacha20poly1305/chacha20poly1305.c chacha20poly1305/chacha_merged.c chacha20poly1305/poly1305-donna.c chacha20poly1305/rfc7539.c
2017-08-12 11:43:49 +00:00
rc4.c
2017-05-19 17:17:24 +00:00
nem.c
2017-07-31 14:44:02 +00:00
)
add_library(TrezorCrypto STATIC ${SOURCES})
target_include_directories(TrezorCrypto PUBLIC .)
2017-07-31 14:44:02 +00:00
target_include_directories(TrezorCrypto PUBLIC aes)
target_include_directories(TrezorCrypto PUBLIC chacha20poly1305)
target_include_directories(TrezorCrypto PUBLIC ed25519-donna)
2014-07-17 17:51:00 +00:00
target_compile_options(TrezorCrypto PRIVATE "-std=c99")
2016-04-27 21:32:14 +00:00
if(MSVC)
set_source_files_properties(${SOURCES} PROPERTIES LANGUAGE CXX)
endif(MSVC)
2014-07-17 17:51:00 +00:00
# Build trezor-crypto tests (requires OpenSSL)
if (TREZOR_CRYPTO_TESTS)
add_executable(test_check test_check.c)
target_link_libraries(test_check TrezorCrypto check rt pthread m crypto)
add_test(NAME trezor-crypto COMMAND test_check)
2014-07-16 18:39:02 +00:00
add_executable(test_openssl test_openssl.c)
target_link_libraries(test_openssl TrezorCrypto check rt pthread m crypto)
add_test(NAME trezor-crypto-openssl COMMAND test_openssl 100)
2016-04-27 21:32:14 +00:00
endif()