1set(executables_mbedtls
2    dh_client
3    dh_server
4)
5
6foreach(exe IN LISTS executables_mbedtls)
7    add_executable(${exe} ${exe}.c $<TARGET_OBJECTS:mbedtls_test>)
8    target_link_libraries(${exe} ${mbedtls_target})
9    target_include_directories(${exe} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../../tests/include)
10endforeach()
11
12set(executables_mbedcrypto
13    dh_genprime
14    ecdh_curve25519
15    ecdsa
16    gen_key
17    key_app
18    key_app_writer
19    mpi_demo
20    pk_encrypt
21    pk_decrypt
22    pk_sign
23    pk_verify
24    rsa_decrypt
25    rsa_encrypt
26    rsa_genkey
27    rsa_sign
28    rsa_sign_pss
29    rsa_verify
30    rsa_verify_pss
31)
32
33foreach(exe IN LISTS executables_mbedcrypto)
34    add_executable(${exe} ${exe}.c $<TARGET_OBJECTS:mbedtls_test>)
35    target_link_libraries(${exe} ${mbedcrypto_target})
36    target_include_directories(${exe} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../../tests/include)
37endforeach()
38
39install(TARGETS ${executables_mbedtls} ${executables_mbedcrypto}
40        DESTINATION "bin"
41        PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
42