2021-04-04 22:15:46 +02:00
|
|
|
idf_build_get_property(target IDF_TARGET)
|
|
|
|
|
|
|
|
|
|
if(${target} STREQUAL "linux")
|
|
|
|
|
set(platform_srcs src/esp_modem_primitives_linux.cpp
|
|
|
|
|
src/esp_modem_uart_linux.cpp
|
|
|
|
|
src/esp_modem_netif_linux.cpp)
|
|
|
|
|
set(dependencies esp_system_protocols_linux)
|
|
|
|
|
else()
|
|
|
|
|
set(platform_srcs src/esp_modem_primitives_freertos.cpp
|
2021-11-17 13:27:52 +01:00
|
|
|
src/esp_modem_api_target.cpp
|
2021-04-04 22:15:46 +02:00
|
|
|
src/esp_modem_uart.cpp
|
2021-05-13 07:28:05 +02:00
|
|
|
src/esp_modem_term_uart.cpp
|
2021-04-04 22:15:46 +02:00
|
|
|
src/esp_modem_netif.cpp)
|
2025-10-10 11:30:49 +02:00
|
|
|
set(dependencies esp_event esp_netif)
|
|
|
|
|
if("${IDF_VERSION_MAJOR}.${IDF_VERSION_MINOR}" VERSION_GREATER "5.3")
|
|
|
|
|
list(APPEND dependencies esp_driver_uart)
|
|
|
|
|
else()
|
|
|
|
|
list(APPEND dependencies driver)
|
|
|
|
|
endif()
|
2021-04-04 22:15:46 +02:00
|
|
|
endif()
|
|
|
|
|
|
2022-08-15 18:19:29 +04:00
|
|
|
|
2024-11-01 17:32:02 +01:00
|
|
|
if(CONFIG_ESP_MODEM_ENABLE_DEVELOPMENT_MODE)
|
|
|
|
|
set(command_dir "generate") # using in-place macro expansion with AT commands
|
|
|
|
|
else()
|
|
|
|
|
set(command_dir "command") # using pre-generated AT commands
|
|
|
|
|
endif()
|
|
|
|
|
|
|
|
|
|
|
2021-04-04 22:15:46 +02:00
|
|
|
set(srcs ${platform_srcs}
|
|
|
|
|
"src/esp_modem_dte.cpp"
|
2021-03-24 21:06:27 +01:00
|
|
|
"src/esp_modem_dce.cpp"
|
2021-03-03 20:35:08 +01:00
|
|
|
"src/esp_modem_api.cpp"
|
2021-04-15 09:46:28 +02:00
|
|
|
"src/esp_modem_c_api.cpp"
|
2021-03-07 19:43:45 +01:00
|
|
|
"src/esp_modem_factory.cpp"
|
2021-03-04 20:19:18 +01:00
|
|
|
"src/esp_modem_cmux.cpp"
|
2021-03-07 19:43:45 +01:00
|
|
|
"src/esp_modem_command_library.cpp"
|
2021-05-06 18:57:07 +02:00
|
|
|
"src/esp_modem_term_fs.cpp"
|
2021-05-23 20:43:50 +02:00
|
|
|
"src/esp_modem_vfs_uart_creator.cpp"
|
|
|
|
|
"src/esp_modem_vfs_socket_creator.cpp"
|
2024-11-01 17:32:02 +01:00
|
|
|
"${command_dir}/src/esp_modem_modules.cpp")
|
2020-11-18 21:20:35 +01:00
|
|
|
|
2020-11-18 21:15:08 +01:00
|
|
|
idf_component_register(SRCS "${srcs}"
|
2024-11-01 17:32:02 +01:00
|
|
|
INCLUDE_DIRS include ${command_dir}/include
|
2020-11-18 21:15:08 +01:00
|
|
|
PRIV_INCLUDE_DIRS private_include
|
2021-04-04 22:15:46 +02:00
|
|
|
REQUIRES ${dependencies})
|
2021-02-26 18:32:15 +01:00
|
|
|
|
2022-08-15 18:19:29 +04:00
|
|
|
|
2022-03-04 16:07:38 +07:00
|
|
|
set_target_properties(${COMPONENT_LIB} PROPERTIES
|
|
|
|
|
CXX_STANDARD 17
|
|
|
|
|
CXX_STANDARD_REQUIRED ON
|
|
|
|
|
CXX_EXTENSIONS ON
|
|
|
|
|
)
|
2021-05-15 22:09:08 +02:00
|
|
|
|
2023-11-01 17:08:26 +01:00
|
|
|
if(CONFIG_ESP_MODEM_ADD_CUSTOM_MODULE)
|
|
|
|
|
idf_component_optional_requires(PUBLIC main)
|
|
|
|
|
endif()
|