diff options
Diffstat (limited to 'src/crypto/curve25519/CMakeLists.txt')
-rw-r--r-- | src/crypto/curve25519/CMakeLists.txt | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/src/crypto/curve25519/CMakeLists.txt b/src/crypto/curve25519/CMakeLists.txt new file mode 100644 index 0000000..a2ef3bb --- /dev/null +++ b/src/crypto/curve25519/CMakeLists.txt @@ -0,0 +1,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) |