2019-04-28 07:38:23 +00:00
|
|
|
set(include_dirs include/common
|
2022-05-20 04:28:07 +00:00
|
|
|
include/security
|
|
|
|
include/transports)
|
|
|
|
set(priv_include_dirs proto-c src/common src/crypto/srp6a/include)
|
2019-07-02 06:20:10 +00:00
|
|
|
set(srcs
|
2019-06-21 06:29:32 +00: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 09:33:54 +00:00
|
|
|
"proto-c/sec2.pb-c.c"
|
2019-06-21 06:29:32 +00:00
|
|
|
"proto-c/session.pb-c.c"
|
|
|
|
"src/transports/protocomm_console.c"
|
2022-06-15 18:18:01 +00: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 16:06:48 +00:00
|
|
|
|
|
|
|
if(CONFIG_BT_ENABLED)
|
2019-05-02 13:36:06 +00:00
|
|
|
if(CONFIG_BT_BLUEDROID_ENABLED)
|
2019-04-28 07:38:23 +00:00
|
|
|
list(APPEND srcs
|
2018-07-30 16:06:48 +00:00
|
|
|
"src/simple_ble/simple_ble.c"
|
|
|
|
"src/transports/protocomm_ble.c")
|
2019-07-02 06:20:10 +00: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 16:06:48 +00:00
|
|
|
endif()
|
|
|
|
endif()
|
|
|
|
|
2019-04-28 07:38:23 +00:00
|
|
|
idf_component_register(SRCS "${srcs}"
|
|
|
|
INCLUDE_DIRS "${include_dirs}"
|
|
|
|
PRIV_INCLUDE_DIRS "${priv_include_dirs}"
|
2022-07-18 04:55:14 +00:00
|
|
|
PRIV_REQUIRES protobuf-c mbedtls console esp_http_server driver
|
2019-07-02 06:20:10 +00:00
|
|
|
REQUIRES bt)
|
2022-01-31 18:45:31 +00:00
|
|
|
|
|
|
|
target_compile_options(${COMPONENT_LIB} PRIVATE "-Wno-format")
|