New test app for dynamic loading of libmbed* with dlopen

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
diff --git a/programs/test/CMakeLists.txt b/programs/test/CMakeLists.txt
index 04ec7fc..6233de4 100644
--- a/programs/test/CMakeLists.txt
+++ b/programs/test/CMakeLists.txt
@@ -35,6 +35,12 @@
     target_link_libraries(cpp_dummy_build ${mbedcrypto_target})
 endif()
 
+if(USE_SHARED_MBEDTLS_LIBRARY)
+    add_executable(dlopen "dlopen.c")
+    target_include_directories(dlopen PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../../include)
+    target_link_libraries(dlopen "-ldl")
+endif()
+
 foreach(exe IN LISTS executables_libs executables_mbedcrypto)
     set(extra_sources "")
     if(exe STREQUAL "query_compile_time_config")