esp-idf/components/linux/CMakeLists.txt

17 lines
439 B
CMake
Raw Normal View History

idf_build_get_property(target IDF_TARGET)
if(NOT "${target}" STREQUAL "linux")
return()
endif()
2024-01-23 23:13:32 -05:00
set(includes "include")
if(CMAKE_HOST_SYSTEM_NAME STREQUAL "Darwin")
list(APPEND srcs getrandom.c assert_func.c)
2024-01-23 23:13:32 -05:00
else()
list(APPEND srcs fls.c)
list(APPEND includes "linux_include")
endif()
2024-01-23 23:13:32 -05:00
idf_component_register(INCLUDE_DIRS ${includes}
REQUIRED_IDF_TARGETS linux
SRCS ${srcs})