CMakeLists.txt 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. # Copyright (c) 2020 Actions Semiconductor Co., Ltd
  2. #
  3. # SPDX-License-Identifier: Apache-2.0
  4. zephyr_library_include_directories(${CMAKE_CURRENT_LIST_DIR})
  5. if (CONFIG_PARSER_MP3)
  6. if (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/libmp3_parser/CMakeLists.txt)
  7. add_subdirectory(libmp3_parser)
  8. else()
  9. zephyr_library_import(a1_mp3_p ${CMAKE_CURRENT_LIST_DIR}/a1_mp3_p.a)
  10. endif()
  11. endif()
  12. if (CONFIG_PARSER_WAV)
  13. if (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/libwav_parser/CMakeLists.txt)
  14. add_subdirectory(libwav_parser)
  15. else()
  16. zephyr_library_import(a1_wav_p ${CMAKE_CURRENT_LIST_DIR}/a1_wav_p.a)
  17. endif()
  18. endif()
  19. if (CONFIG_PARSER_WMA)
  20. if (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/libwma_parser/CMakeLists.txt)
  21. add_subdirectory(libwma_parser)
  22. else()
  23. zephyr_library_import(a1_w13_p ${CMAKE_CURRENT_LIST_DIR}/a1_w13_p.a)
  24. endif()
  25. endif()
  26. if (CONFIG_PARSER_APE)
  27. if (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/libape_parser/CMakeLists.txt)
  28. add_subdirectory(libape_parser)
  29. else()
  30. zephyr_library_import(a1_ape_p ${CMAKE_CURRENT_LIST_DIR}/a1_ape_p.a)
  31. endif()
  32. endif()
  33. if (CONFIG_PARSER_FLAC)
  34. if (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/libflac_parser/CMakeLists.txt)
  35. add_subdirectory(libflac_parser)
  36. else()
  37. zephyr_library_import(a1_fla_p ${CMAKE_CURRENT_LIST_DIR}/a1_fla_p.a)
  38. endif()
  39. endif()
  40. if (CONFIG_PARSER_M4A)
  41. if (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/libaac_parser/CMakeLists.txt)
  42. add_subdirectory(libaac_parser)
  43. else()
  44. zephyr_library_import(a1_aac_p ${CMAKE_CURRENT_LIST_DIR}/a1_a13_p.a)
  45. endif()
  46. endif()
  47. if (CONFIG_DECODER_ACT AND NOT CONFIG_DECODER_ACT_HW_ACCELERATION)
  48. if (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/libact_decoder/CMakeLists.txt)
  49. add_subdirectory(libact_decoder)
  50. else()
  51. zephyr_library_import(a1_act_d ${CMAKE_CURRENT_LIST_DIR}/a1_act_d.a)
  52. endif()
  53. endif()
  54. if (CONFIG_MUSIC_DAE_FADE)
  55. if (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/libfade/CMakeLists.txt)
  56. add_subdirectory(libfade)
  57. else()
  58. zephyr_library_import(a1_fad_p ${CMAKE_CURRENT_LIST_DIR}/a1_fad_p.a)
  59. endif()
  60. endif()
  61. if (CONFIG_ENCODER_SBC AND NOT CONFIG_ENCODER_SBC_HW_ACCELERATION)
  62. if (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/liba1_sbc_e/CMakeLists.txt)
  63. add_subdirectory(liba1_sbc_e)
  64. else()
  65. zephyr_library_import(a1_sbc_e ${CMAKE_CURRENT_LIST_DIR}/a1_sbc_e.a)
  66. endif()
  67. endif()
  68. if (CONFIG_RESAMPLE)
  69. if (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/libresample/CMakeLists.txt)
  70. add_subdirectory(libresample)
  71. else()
  72. zephyr_library_import(a1_res_s_p ${CMAKE_CURRENT_LIST_DIR}/a1_res_s_p.a)
  73. endif()
  74. endif()
  75. if (CONFIG_AL_FORMAT_CHECK)
  76. if (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/liba1_fmt_p/CMakeLists.txt)
  77. add_subdirectory(liba1_fmt_p)
  78. else()
  79. zephyr_library_import(a1_fmt_p ${CMAKE_CURRENT_LIST_DIR}/a1_fmt_p.a)
  80. endif()
  81. endif()