2019-06-20 18:38:22 +02:00
|
|
|
cmake_minimum_required(VERSION 2.6)
|
|
|
|
|
|
|
|
# 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-03-09 18:03:48 +01:00
|
|
|
# Link against all the Mbed TLS libraries.
|
2019-06-20 18:38:22 +02:00
|
|
|
set(libs
|
|
|
|
mbedcrypto
|
2020-03-09 18:03:48 +01:00
|
|
|
mbedx509
|
|
|
|
mbedtls
|
2019-06-20 18:38:22 +02:00
|
|
|
)
|
|
|
|
|
|
|
|
add_executable(cmake_subproject cmake_subproject.c)
|
|
|
|
target_link_libraries(cmake_subproject ${libs})
|