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