Allow building as a subdir
Fixes #5688
Signed-off-by: Robert Shade <robert.shade@gmail.com>
diff --git a/library/CMakeLists.txt b/library/CMakeLists.txt
index 6bb2ad3..c01dbc6 100644
--- a/library/CMakeLists.txt
+++ b/library/CMakeLists.txt
@@ -279,6 +279,7 @@
endif(USE_SHARED_MBEDTLS_LIBRARY)
foreach(target IN LISTS target_libraries)
+ add_library(MbedTLS::${target} ALIAS ${target}) # add_subdirectory support
# Include public header files from /include and other directories
# declared by /3rdparty/**/CMakeLists.txt. Include private header files
# from /library and others declared by /3rdparty/**/CMakeLists.txt.