CMakeLists.txt 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. set( SRC_FILES
  2. "main.c"
  3. "alac_magic_cookie.c"
  4. "settings.c"
  5. "audio/audio_receiver.c"
  6. "audio/audio_stream.c"
  7. "audio/audio_stream_realtime.c"
  8. "audio/audio_stream_buffered.c"
  9. "audio/audio_decoder.c"
  10. "audio/audio_buffer.c"
  11. "audio/audio_timing.c"
  12. "audio/audio_crypto.c"
  13. "audio/audio_resample.c"
  14. "rtsp/rtsp_server.c"
  15. "rtsp/rtsp_conn.c"
  16. "rtsp/rtsp_message.c"
  17. "rtsp/rtsp_handlers.c"
  18. "rtsp/rtsp_fairplay.c"
  19. "rtsp/rtsp_crypto.c"
  20. "rtsp/rtsp_rsa.c"
  21. "rtsp/rtsp_events.c"
  22. "plist/plist_xml.c"
  23. "plist/bplist_parser.c"
  24. "plist/bplist_builder.c"
  25. "plist/base64.c"
  26. "hap/hap.c"
  27. "hap/hap_pair_verify.c"
  28. "hap/hap_pair_setup.c"
  29. "hap/hap_crypto.c"
  30. "hap/srp.c"
  31. "hap/tlv8.c"
  32. "network/wifi.c"
  33. "network/mdns_airplay.c"
  34. "network/ptp_clock.c"
  35. "network/ntp_clock.c"
  36. "network/socket_utils.c"
  37. "network/web_server.c"
  38. "network/ota.c"
  39. "network/dns_server.c"
  40. "network/log_stream.c"
  41. "led.c"
  42. "audio/eq_events.c"
  43. "buttons.c"
  44. "playback_control.c"
  45. "dacp_client.c"
  46. "panel_uart.c"
  47. )
  48. # Select audio output implementation at compile time
  49. if(CONFIG_AUDIO_OUTPUT_SPDIF)
  50. list(APPEND SRC_FILES "audio/audio_output_spdif.c")
  51. elseif(CONFIG_AUDIO_OUTPUT_USB)
  52. list(APPEND SRC_FILES "audio/audio_output_usb.c")
  53. else()
  54. list(APPEND SRC_FILES "audio/audio_output.c")
  55. list(APPEND SRC_FILES "audio/audio_prompt.c")
  56. endif()
  57. # Bluetooth A2DP sink (only available on ESP32 with Classic BT)
  58. if(CONFIG_BT_A2DP_ENABLE)
  59. list(APPEND SRC_FILES "audio/a2dp_sink.c")
  60. endif()
  61. # W5500 SPI Ethernet
  62. if(CONFIG_ETH_W5500_ENABLED)
  63. list(APPEND SRC_FILES "network/ethernet.c")
  64. endif()
  65. set( INC_DIRS
  66. "."
  67. "audio"
  68. "rtsp"
  69. "plist"
  70. "hap"
  71. "network"
  72. )
  73. set( DEPS
  74. driver
  75. nvs_flash
  76. esp_wifi
  77. esp_netif
  78. esp_event
  79. esp_ringbuf
  80. esp_driver_i2s
  81. esp_timer
  82. esp_http_server
  83. esp_http_client
  84. app_update
  85. json
  86. mbedtls
  87. esp_driver_ledc
  88. boards
  89. dac
  90. dac_tas58xx
  91. dac_njw1195
  92. display
  93. audio-resampler
  94. esp_eth
  95. spiffs_storage
  96. )
  97. # TODO: why these fall over in CI and fine locally...
  98. # Bluetooth component only needed when A2DP is enabled
  99. #if(CONFIG_BT_A2DP_ENABLE)
  100. list(APPEND DEPS bt)
  101. #endif()
  102. # Ethernet component only needed when W5500 is enabled
  103. #if(CONFIG_ETH_W5500_ENABLED)
  104. list(APPEND DEPS esp_eth)
  105. #endif()
  106. idf_component_register(
  107. SRCS ${SRC_FILES}
  108. INCLUDE_DIRS ${INC_DIRS}
  109. PRIV_REQUIRES ${DEPS}
  110. )
  111. # Enable function wrapping for abort() to intercept panics and mute GPIO
  112. if(CONFIG_BOARD_SQUEEZEAMP_COMMON)
  113. target_link_libraries(${COMPONENT_LIB} INTERFACE "-Wl,--wrap=abort")
  114. endif()