2023-09-12 15:27:24 +00:00
|
|
|
cmake_minimum_required(VERSION 3.5.1)
|
2019-06-20 16:38:22 +00:00
|
|
|
|
2020-10-13 15:30:41 +00:00
|
|
|
# Test the target renaming support by adding a prefix to the targets built
|
|
|
|
set(MBEDTLS_TARGET_PREFIX subproject_test_)
|
|
|
|
|
2019-06-20 16:38:22 +00:00
|
|
|
# We use the parent Mbed TLS directory as the MBEDTLS_DIR for this test. Other
|
|
|
|
# projects that use Mbed TLS as a subproject are likely to add by their own
|
|
|
|
# relative paths.
|
|
|
|
set(MBEDTLS_DIR ../../../)
|
|
|
|
|
|
|
|
# Add Mbed TLS as a subdirectory.
|
|
|
|
add_subdirectory(${MBEDTLS_DIR} build)
|
|
|
|
|
2020-10-13 15:30:41 +00:00
|
|
|
# Link against all the Mbed TLS libraries. Verifies that the targets have been
|
|
|
|
# created using the specified prefix
|
2019-06-20 16:38:22 +00:00
|
|
|
set(libs
|
2024-10-25 14:01:14 +00:00
|
|
|
subproject_test_tfpsacrypto
|
2020-10-13 15:30:41 +00:00
|
|
|
subproject_test_mbedx509
|
|
|
|
subproject_test_mbedtls
|
2019-06-20 16:38:22 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
add_executable(cmake_subproject cmake_subproject.c)
|
2023-12-15 17:14:34 +00:00
|
|
|
target_link_libraries(cmake_subproject ${libs} ${CMAKE_THREAD_LIBS_INIT})
|