aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
blob: 114b6e4e45ba4e77ba61b3217ee69dbbee598c24 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# set(CMAKE_TOOLCHAIN_FILE CMakeToolchain.txt)
project(tinycrypt C)

# Required cmake version
cmake_minimum_required(VERSION 2.8.12)

# global needed variables
set(APPLICATION_NAME ${PROJECT_NAME})

set(APPLICATION_VERSION_MAJOR "0")
set(APPLICATION_VERSION_MINOR "0")
set(APPLICATION_VERSION_PATCH "1")

set(CMAKE_BUILD_TYPE Debug)

set(APPLICATION_VERSION
	"${APPLICATION_VERSION_MAJOR}.${APPLICATION_VERSION_MINOR}.${APPLICATION_VERSION_PATCH}")

include_directories(include
	include/tinycrypt
	include/nrf_sec)

set(TINYCRYPT-SRC source/ecc_dsa.c
	       source/ecc.c
	       source/ecc_dh.c
	       source/sha256.c
	       source/utils.c
	       source/signtest.c)

add_definitions(-std=c99 -DNRF52)
add_executable(ecc_test ${TINYCRYPT-SRC})

set(TCSIGN-SRC source/ecc.c
	       source/ecc_dh.c
	       source/ecc_dsa.c
	       source/sha256.c
	       source/utils.c
	       source/main.c)

add_executable(tcsign ${TCSIGN-SRC})

set_directory_properties(PROPERTIES
	ADDITIONAL_MAKE_CLEAN_FILES "${CMAKE_CURRENT_BINARY_DIR}/nordic_test_key.pri"
	ADDITIONAL_MAKE_CLEAN_FILES "${CMAKE_CURRENT_BINARY_DIR}/nordic_test_key.pub")