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 25 x25519-x86_64.c 26 27 ${CURVE25519_ARCH_SOURCES} 28 ) 29 30 add_executable( 31 ed25519_test 32 33 ed25519_test.cc 34 $<TARGET_OBJECTS:test_support> 35 ) 36 37 target_link_libraries(ed25519_test crypto) 38 add_dependencies(all_tests ed25519_test) 39 40 add_executable( 41 x25519_test 42 43 x25519_test.cc 44 ) 45 46 target_link_libraries(x25519_test crypto) 47 add_dependencies(all_tests x25519_test) 48