Adam Langley | 4139edb | 2016-01-13 15:00:54 -0800 | [diff] [blame] | 1 | include_directories(../../include) |
| 2 | |
| 3 | if (${ARCH} STREQUAL "arm") |
| 4 | set( |
| 5 | CURVE25519_ARCH_SOURCES |
| 6 | |
| 7 | asm/x25519-asm-arm.S |
| 8 | ) |
| 9 | endif() |
| 10 | |
| 11 | if (${ARCH} STREQUAL "x86_64") |
| 12 | set( |
| 13 | CURVE25519_ARCH_SOURCES |
| 14 | |
| 15 | asm/x25519-asm-x86_64.S |
| 16 | ) |
| 17 | endif() |
| 18 | |
| 19 | add_library( |
| 20 | curve25519 |
| 21 | |
| 22 | OBJECT |
| 23 | |
| 24 | curve25519.c |
David Benjamin | 4969cc9 | 2016-04-22 15:02:23 -0400 | [diff] [blame] | 25 | spake25519.c |
Adam Langley | 4139edb | 2016-01-13 15:00:54 -0800 | [diff] [blame] | 26 | x25519-x86_64.c |
| 27 | |
| 28 | ${CURVE25519_ARCH_SOURCES} |
| 29 | ) |
| 30 | |
| 31 | add_executable( |
| 32 | ed25519_test |
| 33 | |
| 34 | ed25519_test.cc |
| 35 | $<TARGET_OBJECTS:test_support> |
| 36 | ) |
| 37 | |
| 38 | target_link_libraries(ed25519_test crypto) |
| 39 | add_dependencies(all_tests ed25519_test) |