mirror of
https://github.com/espressif/esp-idf.git
synced 2026-09-22 13:01:16 +03:00
Keep Linux components include-only when their runtime dependencies are unavailable. Co-authored-by: Cursor <cursoragent@cursor.com>
30 lines
934 B
CMake
30 lines
934 B
CMake
idf_build_get_property(target IDF_TARGET)
|
|
|
|
set(srcs)
|
|
set(public_include "include")
|
|
if(CONFIG_SOC_TEMP_SENSOR_SUPPORTED)
|
|
list(APPEND srcs "src/temperature_sensor.c")
|
|
if(CONFIG_SOC_TEMPERATURE_SENSOR_SUPPORT_ETM)
|
|
list(APPEND srcs "src/temperature_sensor_etm.c")
|
|
endif()
|
|
if(CONFIG_SOC_PAU_SUPPORTED AND CONFIG_SOC_TEMPERATURE_SENSOR_SUPPORT_SLEEP_RETENTION
|
|
AND CONFIG_SOC_TEMPERATURE_SENSOR_UNDER_PD_TOP_DOMAIN)
|
|
list(APPEND srcs "${target}/temperature_sensor_retention.c")
|
|
endif()
|
|
endif()
|
|
|
|
if(${target} STREQUAL "linux")
|
|
set(requires "")
|
|
set(priv_req "")
|
|
else()
|
|
set(requires esp_hal_ana_conv)
|
|
set(priv_req efuse)
|
|
endif()
|
|
|
|
idf_component_register(SRCS ${srcs}
|
|
INCLUDE_DIRS ${public_include}
|
|
PRIV_INCLUDE_DIRS "src"
|
|
REQUIRES "${requires}"
|
|
PRIV_REQUIRES ${priv_req}
|
|
)
|