CMakeLists.txt 886 B

123456789101112131415161718192021222324252627282930313233
  1. idf_build_get_property(target IDF_TARGET)
  2. if(${target} STREQUAL "linux")
  3. return() # This component is not supported by the POSIX/Linux simulator
  4. endif()
  5. set(srcs "src/gpio.c"
  6. "src/gpio_glitch_filter_ops.c"
  7. "src/rtc_io.c"
  8. )
  9. set(public_include "include")
  10. if(CONFIG_SOC_DEDICATED_GPIO_SUPPORTED)
  11. list(APPEND srcs "src/dedic_gpio.c")
  12. endif()
  13. if(CONFIG_SOC_GPIO_SUPPORT_PIN_GLITCH_FILTER)
  14. list(APPEND srcs "src/gpio_pin_glitch_filter.c")
  15. endif()
  16. if(CONFIG_SOC_GPIO_FLEX_GLITCH_FILTER_NUM GREATER 0)
  17. list(APPEND srcs "src/gpio_flex_glitch_filter.c")
  18. endif()
  19. if(CONFIG_SOC_GPIO_SUPPORT_ETM)
  20. list(APPEND srcs "src/gpio_etm.c")
  21. endif()
  22. idf_component_register(SRCS ${srcs}
  23. INCLUDE_DIRS ${public_include}
  24. PRIV_REQUIRES esp_pm
  25. LDFRAGMENTS "linker.lf"
  26. )