CMakeLists.txt 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. # Copyright (c) 2020 Actions Semiconductor Co., Ltd
  2. #
  3. # SPDX-License-Identifier: Apache-2.0
  4. if (CONFIG_MEDIA)
  5. set(ZEPHYR_CURRENT_LIBRARY acts_media)
  6. add_library(acts_media INTERFACE)
  7. zephyr_include_directories(
  8. include
  9. )
  10. target_include_directories(acts_media INTERFACE
  11. include
  12. )
  13. zephyr_library()
  14. zephyr_library_sources(media_mem.c)
  15. zephyr_library_sources_ifdef(CONFIG_MEDIA_PLAYER media_player.c)
  16. zephyr_library_sources_ifdef(CONFIG_MEDIA_SERVICE codec_config.c media_effect_param.c parser_config.c media_mix_pcm.c)
  17. add_subdirectory_ifdef(CONFIG_VIDEO_PLAYER video_player)
  18. add_subdirectory(libal)
  19. if (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/libmedia/CMakeLists.txt)
  20. add_subdirectory_ifdef(CONFIG_MEDIA_SERVICE libmedia)
  21. else()
  22. zephyr_library_include_directories(${CMAKE_CURRENT_LIST_DIR})
  23. zephyr_library_import(media ${CMAKE_CURRENT_LIST_DIR}/libmedia.a)
  24. endif()
  25. zephyr_library_link_libraries_ifdef(CONFIG_MEDIA_SERVICE media)
  26. zephyr_library_link_libraries_ifdef(CONFIG_FAT_FILESYSTEM_ELM ELMFAT INTERFACE)
  27. target_link_libraries(acts_media INTERFACE zephyr_interface)
  28. endif()