Skip to content

Commit

Permalink
Merge pull request #5837 from robert-shade/robert-shade/add_subdirect…
Browse files Browse the repository at this point in the history
…ory_support

Allow building as a subdir
  • Loading branch information
daverodgman authored Jun 6, 2022
2 parents 8399ccc + 591e729 commit 5e03d9e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ChangeLog.d/cmake_add_subdirectory_support.txt
Original file line number Diff line number Diff line change
@@ -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 change: 1 addition & 0 deletions library/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,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.
Expand Down

0 comments on commit 5e03d9e

Please sign in to comment.