From 79e3b946dbc8dbd832f8b6f457e35d06c32b0782 Mon Sep 17 00:00:00 2001 From: Jarno Lamsa Date: Wed, 24 Apr 2019 16:17:10 +0300 Subject: [PATCH] Add CMake support for uecc --- CMakeLists.txt | 1 + include/CMakeLists.txt | 1 + library/CMakeLists.txt | 2 ++ tinycrypt/CMakeLists.txt | 7 +++++++ 4 files changed, 11 insertions(+) create mode 100644 tinycrypt/CMakeLists.txt diff --git a/CMakeLists.txt b/CMakeLists.txt index 99bf31f1f..d4a236f3f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -179,6 +179,7 @@ endif(ENABLE_ZLIB_SUPPORT) add_subdirectory(library) add_subdirectory(include) +add_subdirectory(tinycrypt) if(ENABLE_PROGRAMS) add_subdirectory(programs) diff --git a/include/CMakeLists.txt b/include/CMakeLists.txt index 1b581a54d..862fa9298 100644 --- a/include/CMakeLists.txt +++ b/include/CMakeLists.txt @@ -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 diff --git a/library/CMakeLists.txt b/library/CMakeLists.txt index f3c804481..ebcfea913 100644 --- a/library/CMakeLists.txt +++ b/library/CMakeLists.txt @@ -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) diff --git a/tinycrypt/CMakeLists.txt b/tinycrypt/CMakeLists.txt new file mode 100644 index 000000000..7674d83be --- /dev/null +++ b/tinycrypt/CMakeLists.txt @@ -0,0 +1,7 @@ +set(src_tinycrypt + ecc_dh.c + ecc_dsa.c + ecc.c +) + +add_library(tinycrypt STATIC ${src_tinycrypt})