CMake: support "make programs"

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
diff --git a/programs/x509/CMakeLists.txt b/programs/x509/CMakeLists.txt
index 43437f0..a09813c 100644
--- a/programs/x509/CMakeLists.txt
+++ b/programs/x509/CMakeLists.txt
@@ -10,6 +10,7 @@
     load_roots
     req_app
 )
+add_dependencies(${programs_target} ${executables})
 
 foreach(exe IN LISTS executables)
     add_executable(${exe} ${exe}.c $<TARGET_OBJECTS:mbedtls_test>)