1include_directories(../../include)
2
3if (${ARCH} STREQUAL "arm")
4  set(
5    CURVE25519_ARCH_SOURCES
6
7    asm/x25519-asm-arm.S
8  )
9endif()
10
11if (${ARCH} STREQUAL "x86_64")
12  set(
13    CURVE25519_ARCH_SOURCES
14
15    asm/x25519-asm-x86_64.S
16  )
17endif()
18
19add_library(
20  curve25519
21
22  OBJECT
23
24  curve25519.c
25  x25519-x86_64.c
26
27  ${CURVE25519_ARCH_SOURCES}
28)
29
30add_executable(
31  ed25519_test
32
33  ed25519_test.cc
34  $<TARGET_OBJECTS:test_support>
35)
36
37target_link_libraries(ed25519_test crypto)
38add_dependencies(all_tests ed25519_test)
39
40add_executable(
41  x25519_test
42
43  x25519_test.cc
44)
45
46target_link_libraries(x25519_test crypto)
47add_dependencies(all_tests x25519_test)
48