Files
esp-idf/components/esp_driver_ana_cmpr/CMakeLists.txt
T
Marius VikhammerandCursor e2c86567ac fix: preserve Linux component header registration
Keep Linux components include-only when their runtime dependencies are unavailable.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-06 13:36:34 +08:00

27 lines
718 B
CMake

idf_build_get_property(target IDF_TARGET)
set(srcs)
# Analog comparator related source files
if(CONFIG_SOC_ANA_CMPR_SUPPORTED)
list(APPEND srcs "ana_cmpr.c")
if(CONFIG_SOC_ANA_CMPR_SUPPORT_ETM)
list(APPEND srcs "ana_cmpr_etm.c")
endif()
endif()
if(${target} STREQUAL "linux")
set(priv_requires "")
set(requires "")
else()
set(priv_requires esp_pm esp_driver_gpio)
set(requires esp_hal_ana_cmpr)
endif()
idf_component_register(SRCS ${srcs}
INCLUDE_DIRS "include"
PRIV_REQUIRES "${priv_requires}"
REQUIRES "${requires}"
LDFRAGMENTS "linker.lf"
)