blob: c507de2a74d9489a801bb2465f7c65aa7e402a45 [file] [log] [blame]
Paul Elliott4068c7e2023-12-15 17:14:34 +00001find_package(Threads)
2
Paul Bakkerb06819b2011-01-18 16:18:38 +00003set(libs
Raef Coles995c66f2020-10-13 16:30:41 +01004 ${mbedx509_target}
Paul Bakkerb06819b2011-01-18 16:18:38 +00005)
6
Ronald Cronbfd45f12020-06-05 11:15:31 +02007set(executables
8 cert_app
9 cert_req
10 cert_write
11 crl_app
Gilles Peskine2c1442e2021-07-26 20:20:54 +020012 load_roots
Ronald Cronbfd45f12020-06-05 11:15:31 +020013 req_app
14)
Paul Bakker547f73d2011-01-05 15:07:54 +000015
Ronald Cronbfd45f12020-06-05 11:15:31 +020016foreach(exe IN LISTS executables)
Ronald Cron8dc0af22020-06-05 16:00:22 +020017 add_executable(${exe} ${exe}.c $<TARGET_OBJECTS:mbedtls_test>)
Paul Elliott4068c7e2023-12-15 17:14:34 +000018 target_link_libraries(${exe} ${libs} ${CMAKE_THREAD_LIBS_INIT})
Manuel Pégourié-Gonnard36a89632021-06-15 11:43:33 +020019 target_include_directories(${exe} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../../tests/include)
Ronald Cronbfd45f12020-06-05 11:15:31 +020020endforeach()
Paul Bakkera9507c02011-02-12 15:27:28 +000021
Raef Coles995c66f2020-10-13 16:30:41 +010022target_link_libraries(cert_app ${mbedtls_target})
Paul Bakkerf9f377e2013-09-09 15:35:10 +020023
Ronald Cronbfd45f12020-06-05 11:15:31 +020024install(TARGETS ${executables}
Paul Bakker547f73d2011-01-05 15:07:54 +000025 DESTINATION "bin"
26 PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)