mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2026-08-15 15:47:49 +00:00
programs: cmake: Use list of executables
Use list of executables to: - factorize the code to define executables - highlight the similarities and differences of the executable definitions - avoid list duplication Use alphabetic order for executables in lists. Signed-off-by: Ronald Cron <[email protected]>
This commit is contained in:
@@ -2,12 +2,16 @@ set(libs
|
||||
mbedcrypto
|
||||
)
|
||||
|
||||
add_executable(strerror strerror.c)
|
||||
target_link_libraries(strerror ${libs})
|
||||
set(executables
|
||||
pem2der
|
||||
strerror
|
||||
)
|
||||
|
||||
add_executable(pem2der pem2der.c)
|
||||
target_link_libraries(pem2der ${libs})
|
||||
foreach(exe IN LISTS executables)
|
||||
add_executable(${exe} ${exe}.c)
|
||||
target_link_libraries(${exe} ${libs})
|
||||
endforeach()
|
||||
|
||||
install(TARGETS strerror pem2der
|
||||
install(TARGETS ${executables}
|
||||
DESTINATION "bin"
|
||||
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
|
||||
|
||||
Reference in New Issue
Block a user