Add CMake support for uecc

This commit is contained in:
Jarno Lamsa 2019-04-24 16:17:10 +03:00
parent 18987a420b
commit 79e3b946db
4 changed files with 11 additions and 0 deletions

View file

@ -179,6 +179,7 @@ endif(ENABLE_ZLIB_SUPPORT)
add_subdirectory(library)
add_subdirectory(include)
add_subdirectory(tinycrypt)
if(ENABLE_PROGRAMS)
add_subdirectory(programs)

View file

@ -3,6 +3,7 @@ option(INSTALL_MBEDTLS_HEADERS "Install mbed TLS headers." ON)
if(INSTALL_MBEDTLS_HEADERS)
file(GLOB headers "mbedtls/*.h")
file(GLOB headers "tinycrypt/*.h")
install(FILES ${headers}
DESTINATION include/mbedtls

View file

@ -131,6 +131,8 @@ if(LINK_WITH_PTHREAD)
set(libs ${libs} pthread)
endif()
set(lib ${libs} tinycrypt)
if (NOT USE_STATIC_MBEDTLS_LIBRARY AND NOT USE_SHARED_MBEDTLS_LIBRARY)
message(FATAL_ERROR "Need to choose static or shared mbedtls build!")
endif(NOT USE_STATIC_MBEDTLS_LIBRARY AND NOT USE_SHARED_MBEDTLS_LIBRARY)

7
tinycrypt/CMakeLists.txt Normal file
View file

@ -0,0 +1,7 @@
set(src_tinycrypt
ecc_dh.c
ecc_dsa.c
ecc.c
)
add_library(tinycrypt STATIC ${src_tinycrypt})