2023-08-28 02:02:08 -04:00
|
|
|
idf_build_get_property(target IDF_TARGET)
|
|
|
|
|
|
|
|
if(${target} STREQUAL "linux")
|
|
|
|
return() # This component is not supported by the POSIX/Linux simulator
|
|
|
|
endif()
|
|
|
|
|
2019-04-28 03:38:23 -04:00
|
|
|
set(include_dirs include/common
|
2022-05-20 00:28:07 -04:00
|
|
|
include/security
|
|
|
|
include/transports)
|
|
|
|
set(priv_include_dirs proto-c src/common src/crypto/srp6a/include)
|
2019-07-02 02:20:10 -04:00
|
|
|
set(srcs
|
2019-06-21 02:29:32 -04:00
|
|
|
"src/common/protocomm.c"
|
|
|
|
"proto-c/constants.pb-c.c"
|
|
|
|
"proto-c/sec0.pb-c.c"
|
|
|
|
"proto-c/sec1.pb-c.c"
|
2022-05-30 05:33:54 -04:00
|
|
|
"proto-c/sec2.pb-c.c"
|
2019-06-21 02:29:32 -04:00
|
|
|
"proto-c/session.pb-c.c"
|
|
|
|
"src/transports/protocomm_console.c"
|
2022-06-15 14:18:01 -04:00
|
|
|
"src/transports/protocomm_httpd.c")
|
|
|
|
|
|
|
|
if(CONFIG_ESP_PROTOCOMM_SUPPORT_SECURITY_VERSION_0)
|
|
|
|
list(APPEND srcs
|
|
|
|
"src/security/security0.c")
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if(CONFIG_ESP_PROTOCOMM_SUPPORT_SECURITY_VERSION_1)
|
|
|
|
list(APPEND srcs
|
|
|
|
"src/security/security1.c")
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if(CONFIG_ESP_PROTOCOMM_SUPPORT_SECURITY_VERSION_2)
|
|
|
|
list(APPEND srcs
|
|
|
|
"src/security/security2.c"
|
|
|
|
"src/crypto/srp6a/esp_srp.c"
|
|
|
|
"src/crypto/srp6a/esp_srp_mpi.c")
|
|
|
|
endif()
|
2018-07-30 12:06:48 -04:00
|
|
|
|
|
|
|
if(CONFIG_BT_ENABLED)
|
2019-05-02 09:36:06 -04:00
|
|
|
if(CONFIG_BT_BLUEDROID_ENABLED)
|
2019-04-28 03:38:23 -04:00
|
|
|
list(APPEND srcs
|
2018-07-30 12:06:48 -04:00
|
|
|
"src/simple_ble/simple_ble.c"
|
|
|
|
"src/transports/protocomm_ble.c")
|
2019-07-02 02:20:10 -04:00
|
|
|
list(APPEND priv_include_dirs
|
|
|
|
src/simple_ble)
|
|
|
|
endif()
|
|
|
|
if(CONFIG_BT_NIMBLE_ENABLED)
|
|
|
|
list(APPEND srcs
|
|
|
|
"src/transports/protocomm_nimble.c")
|
2018-07-30 12:06:48 -04:00
|
|
|
endif()
|
|
|
|
endif()
|
|
|
|
|
2019-04-28 03:38:23 -04:00
|
|
|
idf_component_register(SRCS "${srcs}"
|
|
|
|
INCLUDE_DIRS "${include_dirs}"
|
|
|
|
PRIV_INCLUDE_DIRS "${priv_include_dirs}"
|
2022-07-18 00:55:14 -04:00
|
|
|
PRIV_REQUIRES protobuf-c mbedtls console esp_http_server driver
|
2019-07-02 02:20:10 -04:00
|
|
|
REQUIRES bt)
|