mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
7b8f69404f
This makes getrandom(2) usable when compiling with IDF_TARGET=linux on a macOS host.
13 lines
320 B
CMake
13 lines
320 B
CMake
idf_build_get_property(target IDF_TARGET)
|
|
if(NOT "${target}" STREQUAL "linux")
|
|
return()
|
|
endif()
|
|
|
|
if(CMAKE_HOST_SYSTEM_NAME STREQUAL "Darwin")
|
|
list(APPEND srcs getrandom.c)
|
|
endif()
|
|
|
|
idf_component_register(INCLUDE_DIRS include
|
|
REQUIRED_IDF_TARGETS linux
|
|
SRCS ${srcs})
|