CMakeLists.txt 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. # for the forgetful, REQUIRES cannot use CONFIG_XXX due to parsing order
  2. if(IDF_TARGET STREQUAL "esp32")
  3. set(target_requires "driver_bt")
  4. endif()
  5. idf_component_register( SRC_DIRS . external ac101 tas57xx wm8978
  6. INCLUDE_DIRS . ac101
  7. PRIV_REQUIRES
  8. codecs
  9. newlib
  10. esp_common
  11. esp-dsp
  12. platform_config
  13. services
  14. spotify
  15. raop
  16. display
  17. tools
  18. audio
  19. _override
  20. ${target_requires}
  21. EMBED_FILES vu_s.data arrow.data
  22. )
  23. set_source_files_properties(mad.c pcm.c flac.c alac.c helix-aac.c vorbis.c opus.c
  24. PROPERTIES COMPILE_FLAGS
  25. -Wno-maybe-uninitialized
  26. )
  27. set_source_files_properties(wm8978/wm8978.c
  28. PROPERTIES COMPILE_FLAGS
  29. -Wno-unused-function
  30. )
  31. add_definitions(-DLINKALL -DLOOPBACK -DNO_FAAD -DEMBEDDED -DTREMOR_ONLY -DCUSTOM_VERSION=${BUILD_NUMBER})
  32. if (${DEPTH} EQUAL "32")
  33. add_definitions(-DBYTES_PER_FRAME=8)
  34. else()
  35. add_definitions(-DRESAMPLE16 -DBYTES_PER_FRAME=4)
  36. endif()
  37. if (NOT DEFINED AAC_DISABLED_SBR)
  38. add_definitions(-DAAC_ENABLE_SBR)
  39. endif()
  40. add_compile_options (-O3 )