CMakeLists.txt 1.0 KB

12345678910111213141516171819202122232425262728
  1. set(srcs esp_tls.c esp-tls-crypto/esp_tls_crypto.c esp_tls_error_capture.c)
  2. if(CONFIG_ESP_TLS_USING_MBEDTLS)
  3. list(APPEND srcs
  4. "esp_tls_mbedtls.c")
  5. endif()
  6. if(CONFIG_ESP_TLS_USING_WOLFSSL)
  7. list(APPEND srcs
  8. "esp_tls_wolfssl.c")
  9. endif()
  10. idf_component_register(SRCS "${srcs}"
  11. INCLUDE_DIRS . esp-tls-crypto
  12. PRIV_INCLUDE_DIRS "private_include"
  13. # mbedtls is public requirements becasue esp_tls.h
  14. # includes mbedtls header files.
  15. REQUIRES mbedtls
  16. PRIV_REQUIRES lwip http_parser)
  17. if(CONFIG_ESP_TLS_USING_WOLFSSL)
  18. idf_component_get_property(wolfssl esp-wolfssl COMPONENT_LIB)
  19. target_link_libraries(${COMPONENT_LIB} PUBLIC ${wolfssl})
  20. endif()
  21. # Increase link multiplicity to get some lwip symbols correctly resolved by the linker
  22. # due to cyclic dependencies present in IDF for lwip/esp_netif/mbedtls
  23. idf_component_get_property(lwip lwip COMPONENT_LIB)
  24. set_property(TARGET ${lwip} APPEND PROPERTY LINK_INTERFACE_MULTIPLICITY 5)