Building with audio component only

Is it possible to build SDL2 with the audio component only?

I tried unchecking the joystick, video, events in CMake, but still keeps looking for these components (undefined reference) when linking to the application.

If SDL2’s CMake can make you opt out these components, it does not make sense that it will search it again and throw undefined references.

Adding it back will make the lib and exe size the same as you would not opting these components out.

In theory you can drop all these subsystems, but in practice no one does this so it doesn’t surprise me that it doesn’t work.

There’s a lot of interconnected bits of code that we probably take for granted (for example: the audio subsystem uses the event subsystem to alert about device hotplugging, etc).

Hey, thanks Ryan. I see. I am trying to do this with MojoAL and hopefully reduce the bulk, but if that is the case, then I will just do some exe compression as a workaround.