CMakeLists.txt 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  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. led_strip
  20. _override
  21. ${target_requires}
  22. EMBED_FILES vu_s.data arrow.data
  23. )
  24. set_source_files_properties(mad.c pcm.c flac.c alac.c helix-aac.c vorbis.c opus.c
  25. PROPERTIES COMPILE_FLAGS
  26. -Wno-maybe-uninitialized
  27. )
  28. set_source_files_properties(wm8978/wm8978.c
  29. PROPERTIES COMPILE_FLAGS
  30. -Wno-unused-function
  31. )
  32. add_definitions(-DLINKALL -DLOOPBACK -DNO_FAAD -DEMBEDDED -DTREMOR_ONLY -DCUSTOM_VERSION=${BUILD_NUMBER})
  33. if (${DEPTH} EQUAL "32")
  34. add_definitions(-DBYTES_PER_FRAME=8)
  35. else()
  36. add_definitions(-DRESAMPLE16 -DBYTES_PER_FRAME=4)
  37. endif()
  38. if (NOT DEFINED AAC_DISABLED_SBR)
  39. add_definitions(-DAAC_ENABLE_SBR)
  40. endif()
  41. add_compile_options (-O3 )