blob: 30d272da9fd81e8c2f9be0d59f389315690fdcc1 [file] [log] [blame]
Paul Bakkerb06819b2011-01-18 16:18:38 +00001set(libs
Raef Coles995c66f2020-10-13 16:30:41 +01002 ${mbedx509_target}
Paul Bakkerb06819b2011-01-18 16:18:38 +00003)
Kevin Kane0ec1e682016-12-15 09:27:16 -08004if(MSVC)
5 set(libs ${libs} bcrypt)
6endif()
Paul Bakkerb06819b2011-01-18 16:18:38 +00007
Ronald Cronbfd45f12020-06-05 11:15:31 +02008set(executables
9 cert_app
10 cert_req
11 cert_write
12 crl_app
Gilles Peskine2c1442e2021-07-26 20:20:54 +020013 load_roots
Ronald Cronbfd45f12020-06-05 11:15:31 +020014 req_app
15)
Paul Bakker547f73d2011-01-05 15:07:54 +000016
Ronald Cronbfd45f12020-06-05 11:15:31 +020017foreach(exe IN LISTS executables)
Ronald Cron8dc0af22020-06-05 16:00:22 +020018 add_executable(${exe} ${exe}.c $<TARGET_OBJECTS:mbedtls_test>)
Ronald Cronbfd45f12020-06-05 11:15:31 +020019 target_link_libraries(${exe} ${libs})
Manuel Pégourié-Gonnard36a89632021-06-15 11:43:33 +020020 target_include_directories(${exe} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../../tests/include)
Ronald Cronbfd45f12020-06-05 11:15:31 +020021endforeach()
Paul Bakkera9507c02011-02-12 15:27:28 +000022
Raef Coles995c66f2020-10-13 16:30:41 +010023target_link_libraries(cert_app ${mbedtls_target})
Paul Bakkerf9f377e2013-09-09 15:35:10 +020024
Ronald Cronbfd45f12020-06-05 11:15:31 +020025install(TARGETS ${executables}
Paul Bakker547f73d2011-01-05 15:07:54 +000026 DESTINATION "bin"
27 PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)