CMakeLists.txt 748 B

1234567891011121314151617181920212223
  1. cmake_minimum_required(VERSION 2.6)
  2. # Test the target renaming support by adding a prefix to the targets built
  3. set(MBEDTLS_TARGET_PREFIX subproject_test_)
  4. # We use the parent Mbed TLS directory as the MBEDTLS_DIR for this test. Other
  5. # projects that use Mbed TLS as a subproject are likely to add by their own
  6. # relative paths.
  7. set(MBEDTLS_DIR ../../../)
  8. # Add Mbed TLS as a subdirectory.
  9. add_subdirectory(${MBEDTLS_DIR} build)
  10. # Link against all the Mbed TLS libraries. Verifies that the targets have been
  11. # created using the specified prefix
  12. set(libs
  13. subproject_test_mbedcrypto
  14. subproject_test_mbedx509
  15. subproject_test_mbedtls
  16. )
  17. add_executable(cmake_subproject cmake_subproject.c)
  18. target_link_libraries(cmake_subproject ${libs})