zephyr: Enabling CONFIG_BT_AUDIO with no (audio) services enabled causes build error

Describe the bug If CONFIG_BT_AUDIO is enabled, but none of the services (e.g. CONFIG_BT_VCS, CONFIG_BT_MICS) or clients are enabled, then we get a build error stating

  No SOURCES given to Zephyr library: subsys__bluetooth__audio

Because the directory’s CMakeLists.txt only has conditionally enabled source files.

To Reproduce Build e.g. the BT shell project with CONFIG_BT_AUDIO=y and none of the services/clients from subsys/bluetooth/audio/CMakeLists.txt enabled.

Expected behavior If nothing BLE audio related is enabled but CONFIG_BT_AUDIO=y it should still build without error.

Impact Very minor, as CONFIG_BT_AUDIO can just be disabled.

Environment (please complete the following information):

  • Commit SHA or Version used: 57e7fba288cb0b48cc9dbc1190caacd99d548bd7

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 16 (1 by maintainers)

Most upvoted comments

@Thalley I think we should change this from a bug to something else, so that we can consider the appropriate way to handle this before topic-le-audio gets merged.

Not sure exactly what it should be turned into, as it’s not a bug, neither an enhancement. Mayde feature-request to be addressed as part of topic-le-audio ?