Allow building as a subdir

Fixes #5688

Signed-off-by: Robert Shade <[email protected]>
This commit is contained in:
Robert Shade
2022-05-21 12:55:12 -04:00
parent d87e46f3de
commit 591e729b54
2 changed files with 5 additions and 0 deletions
@@ -0,0 +1,4 @@
Changes
* Add aliases for libraries so that the normal MbedTLS::* targets
work when MbedTLS is built as a subdirectory. Allows use of
CMake's FetchContent, as requested in #5688.
+1
View File
@@ -279,6 +279,7 @@ if(USE_SHARED_MBEDTLS_LIBRARY)
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.