mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-02 03:00:34 +03:00
fix: preserve Linux component header registration
Keep Linux components include-only when their runtime dependencies are unavailable. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
co-authored by
Cursor
parent
bd25b59620
commit
e2c86567ac
@@ -1,11 +1,6 @@
|
||||
idf_build_get_property(target IDF_TARGET)
|
||||
|
||||
if(${target} STREQUAL "linux")
|
||||
return() # This component is not supported by the POSIX/Linux simulator
|
||||
endif()
|
||||
|
||||
set(srcs)
|
||||
set(priv_req efuse)
|
||||
set(public_include "include")
|
||||
if(CONFIG_SOC_TEMP_SENSOR_SUPPORTED)
|
||||
list(APPEND srcs "src/temperature_sensor.c")
|
||||
@@ -18,9 +13,17 @@ if(CONFIG_SOC_TEMP_SENSOR_SUPPORTED)
|
||||
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 esp_hal_ana_conv
|
||||
REQUIRES "${requires}"
|
||||
PRIV_REQUIRES ${priv_req}
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user