Ronald Cron | bfd45f1 | 2020-06-05 11:15:31 +0200 | [diff] [blame] | 1 | set(executables |
| 2 | crypto_examples |
| 3 | key_ladder_demo |
| 4 | psa_constant_names |
| 5 | ) |
itayzafrir | a3ff8a6 | 2018-07-10 10:10:21 +0300 | [diff] [blame] | 6 | |
Ronald Cron | bfd45f1 | 2020-06-05 11:15:31 +0200 | [diff] [blame] | 7 | foreach(exe IN LISTS executables) |
Ronald Cron | 8dc0af2 | 2020-06-05 16:00:22 +0200 | [diff] [blame^] | 8 | add_executable(${exe} ${exe}.c $<TARGET_OBJECTS:mbedtls_test>) |
Ronald Cron | bfd45f1 | 2020-06-05 11:15:31 +0200 | [diff] [blame] | 9 | target_link_libraries(${exe} mbedtls) |
Ronald Cron | 8dc0af2 | 2020-06-05 16:00:22 +0200 | [diff] [blame^] | 10 | target_include_directories(${exe} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../../tests/include) |
Ronald Cron | bfd45f1 | 2020-06-05 11:15:31 +0200 | [diff] [blame] | 11 | endforeach() |
Gilles Peskine | f31dbb7 | 2019-01-02 17:28:46 +0100 | [diff] [blame] | 12 | |
Hugues de Valon | 235c72d | 2020-05-28 08:42:01 +0100 | [diff] [blame] | 13 | target_include_directories(psa_constant_names PRIVATE ${CMAKE_CURRENT_BINARY_DIR}) |
Gilles Peskine | 6a78573 | 2019-01-02 17:29:04 +0100 | [diff] [blame] | 14 | |
Darryl Green | 21b33b0 | 2019-02-07 10:50:49 +0000 | [diff] [blame] | 15 | add_custom_target( |
| 16 | psa_constant_names_generated |
okhowang(王沛文) | 3c1b090 | 2020-03-25 19:55:32 +0800 | [diff] [blame] | 17 | COMMAND ${MBEDTLS_PYTHON_EXECUTABLE} scripts/generate_psa_constants.py ${CMAKE_CURRENT_BINARY_DIR} |
Darryl Green | 21b33b0 | 2019-02-07 10:50:49 +0000 | [diff] [blame] | 18 | WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/../../ |
| 19 | ) |
| 20 | add_dependencies(psa_constant_names psa_constant_names_generated) |
| 21 | |
Ronald Cron | bfd45f1 | 2020-06-05 11:15:31 +0200 | [diff] [blame] | 22 | install(TARGETS ${executables} |
itayzafrir | a3ff8a6 | 2018-07-10 10:10:21 +0300 | [diff] [blame] | 23 | DESTINATION "bin" |
| 24 | PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) |
| 25 | |
Gilles Peskine | f31dbb7 | 2019-01-02 17:28:46 +0100 | [diff] [blame] | 26 | install(PROGRAMS |
| 27 | key_ladder_demo.sh |
| 28 | DESTINATION "bin") |