2021-07-21 12:07:53 +08:00
|
|
|
idf_build_get_property(target IDF_TARGET)
|
|
|
|
if(NOT "${target}" STREQUAL "linux")
|
|
|
|
return()
|
|
|
|
endif()
|
|
|
|
|
2024-01-24 12:13:32 +08:00
|
|
|
set(includes "include")
|
2023-12-15 13:50:48 +01:00
|
|
|
if(CMAKE_HOST_SYSTEM_NAME STREQUAL "Darwin")
|
2023-12-19 15:10:00 +01:00
|
|
|
list(APPEND srcs getrandom.c assert_func.c)
|
2024-01-24 12:13:32 +08:00
|
|
|
else()
|
|
|
|
list(APPEND srcs fls.c)
|
|
|
|
list(APPEND includes "linux_include")
|
2023-12-15 13:50:48 +01:00
|
|
|
endif()
|
|
|
|
|
2024-01-24 12:13:32 +08:00
|
|
|
idf_component_register(INCLUDE_DIRS ${includes}
|
2023-12-15 13:50:48 +01:00
|
|
|
REQUIRED_IDF_TARGETS linux
|
|
|
|
SRCS ${srcs})
|