blob: 201f987c7c75a76bea795c5769dd686d444f3e8b [file] [log] [blame]
itayzafrira3ff8a62018-07-10 10:10:21 +03001add_executable(crypto_examples crypto_examples.c)
Gilles Peskine4fa9f9f2020-02-26 19:05:31 +01002target_link_libraries(crypto_examples mbedtls)
itayzafrira3ff8a62018-07-10 10:10:21 +03003
Gilles Peskinef31dbb72019-01-02 17:28:46 +01004add_executable(key_ladder_demo key_ladder_demo.c)
Gilles Peskine4fa9f9f2020-02-26 19:05:31 +01005target_link_libraries(key_ladder_demo mbedtls)
Gilles Peskinef31dbb72019-01-02 17:28:46 +01006
Gilles Peskine6a785732019-01-02 17:29:04 +01007add_executable(psa_constant_names psa_constant_names.c)
Hugues de Valon235c72d2020-05-28 08:42:01 +01008target_include_directories(psa_constant_names PRIVATE ${CMAKE_CURRENT_BINARY_DIR})
Gilles Peskine4fa9f9f2020-02-26 19:05:31 +01009target_link_libraries(psa_constant_names mbedtls)
Gilles Peskine6a785732019-01-02 17:29:04 +010010
Darryl Green21b33b02019-02-07 10:50:49 +000011add_custom_target(
12 psa_constant_names_generated
Hugues de Valon235c72d2020-05-28 08:42:01 +010013 COMMAND ${PYTHON_EXECUTABLE} scripts/generate_psa_constants.py ${CMAKE_CURRENT_BINARY_DIR}
Darryl Green21b33b02019-02-07 10:50:49 +000014 WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/../../
15)
16add_dependencies(psa_constant_names psa_constant_names_generated)
17
Gilles Peskinef31dbb72019-01-02 17:28:46 +010018install(TARGETS
19 crypto_examples
20 key_ladder_demo
Gilles Peskine6a785732019-01-02 17:29:04 +010021 psa_constant_names
itayzafrira3ff8a62018-07-10 10:10:21 +030022 DESTINATION "bin"
23 PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
24
Gilles Peskinef31dbb72019-01-02 17:28:46 +010025install(PROGRAMS
26 key_ladder_demo.sh
27 DESTINATION "bin")