CMakeLists.txt 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. # Copyright (c) 2020 Actions Semiconductor Co., Ltd
  2. #
  3. # SPDX-License-Identifier: Apache-2.0
  4. if (CONFIG_SYSTEM)
  5. set(ZEPHYR_CURRENT_LIBRARY acts_framework_system)
  6. add_library(acts_framework_system INTERFACE)
  7. zephyr_include_directories(
  8. .
  9. include
  10. )
  11. target_include_directories(acts_framework_system INTERFACE
  12. include
  13. )
  14. zephyr_library()
  15. zephyr_library_sources(
  16. app_switcher.c
  17. sys_event.c
  18. sys_manager.c
  19. sys_monitor.c
  20. sys_power_off.c
  21. system_init.c
  22. )
  23. zephyr_library_sources_ifdef(CONFIG_SYS_STANDBY
  24. sys_standby.c
  25. )
  26. zephyr_library_sources_ifdef(CONFIG_ESD_MANAGER
  27. esd_manager.c
  28. )
  29. zephyr_library_sources_ifdef(CONFIG_SYSTEM_SHELL
  30. sys_shell.c
  31. )
  32. zephyr_library_sources_ifdef(CONFIG_TASK_WDT
  33. task_wdt_manager.c
  34. )
  35. add_subdirectory_ifdef(CONFIG_PLAYTTS tts)
  36. add_subdirectory_ifdef(CONFIG_POWER power)
  37. add_subdirectory_ifdef(CONFIG_INPUT input)
  38. add_subdirectory_ifdef(CONFIG_HOTPLUG hotplug)
  39. add_subdirectory_ifdef(CONFIG_MUTIPLE_VOLUME_MANAGER fs_manager)
  40. add_subdirectory_ifdef(CONFIG_ALARM_MANAGER alarm_manager)
  41. add_subdirectory_ifdef(CONFIG_ACTLOG act_log)
  42. zephyr_library_link_libraries(acts_framework_system)
  43. zephyr_library_link_libraries_ifdef(CONFIG_FAT_FILESYSTEM_ELM ELMFAT INTERFACE)
  44. zephyr_library_link_libraries_ifdef(CONFIG_FILE_SYSTEM_LITTLEFS LITTLEFS INTERFACE)
  45. target_link_libraries(acts_framework_system INTERFACE zephyr_interface)
  46. endif()