summaryrefslogtreecommitdiffstats
path: root/src/crypto/curve25519/CMakeLists.txt
blob: a2ef3bb24d669f1a5fd84775561b7da0242e6777 (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
45
46
47
include_directories(../../include)

if (${ARCH} STREQUAL "arm")
  set(
    CURVE25519_ARCH_SOURCES

    asm/x25519-asm-arm.S
  )
endif()

if (${ARCH} STREQUAL "x86_64")
  set(
    CURVE25519_ARCH_SOURCES

    asm/x25519-asm-x86_64.S
  )
endif()

add_library(
  curve25519

  OBJECT

  curve25519.c
  x25519-x86_64.c

  ${CURVE25519_ARCH_SOURCES}
)

add_executable(
  ed25519_test

  ed25519_test.cc
  $<TARGET_OBJECTS:test_support>
)

target_link_libraries(ed25519_test crypto)
add_dependencies(all_tests ed25519_test)

add_executable(
  x25519_test

  x25519_test.cc
)

target_link_libraries(x25519_test crypto)
add_dependencies(all_tests x25519_test)