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)
|
2022-07-27 17:21:43 +04:00
|
|
|
set(dependencies driver esp_event esp_netif)
|
2021-04-04 22:15:46 +02:00
|
|
|
endif()
|
|
|
|
|
2022-08-15 18:19:29 +04:00
|
|
|
|
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"
|
2021-04-04 22:15:46 +02:00
|
|
|
"src/esp_modem_modules.cpp")
|
2020-11-18 21:20:35 +01:00
|
|
|
|
|
|
|
set(include_dirs "include")
|
|
|
|
|
2020-11-18 21:15:08 +01:00
|
|
|
idf_component_register(SRCS "${srcs}"
|
2020-11-18 21:20:35 +01:00
|
|
|
INCLUDE_DIRS "${include_dirs}"
|
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
|
|
|
|
2022-08-15 18:19:29 +04:00
|
|
|
|
2021-05-19 07:28:40 +02:00
|
|
|
if(${target} STREQUAL "linux")
|
|
|
|
# This is needed for ESP_LOGx() macros, as integer formats differ on ESP32(..) and x64
|
|
|
|
set_target_properties(${COMPONENT_LIB} PROPERTIES COMPILE_FLAGS -Wno-format)
|
|
|
|
endif()
|