soloud icon indicating copy to clipboard operation
soloud copied to clipboard

Added miniaudio backend to cmake contrib options

Open danman113 opened this issue 2 years ago • 11 comments

Hello, still pretty new to cmake but this is what I needed to add to the cmake files in order to get miniaudio working correctly on both OSX (clang), windows (msvc) and linux (arm/g++).

I also turned the new Miniaudio setting on by default and turned sdl2 backend off by default. My reasoning being that since miniaudio is actually included in the project, it should be the default. LMK if you think differently and I'll change it back.

danman113 avatar Nov 17 '21 02:11 danman113

Curious what the initial contributor @valid-ptr thinks of this

danman113 avatar Nov 23 '21 00:11 danman113

Curious what the initial contributor @valid-ptr thinks of this

Nice PR.

It can be a good idea to add ${BACKENDS_PATH}/miniaudio/miniaudio.h to the BACKENDS_SOURCES also. Then it will appear in the project (generated by cmake)

valid-ptr avatar Nov 23 '21 09:11 valid-ptr

It can be a good idea to add ${BACKENDS_PATH}/miniaudio/miniaudio.h to the BACKENDS_SOURCES also. Then it will appear in the project (generated by cmake)

Forgive my unfamiliarity with cmake but is this necessary? soloud_miniaudio.cpp already includes miniaudio.h? It seems to work just fine without adding to the backend sources. Is there a non-functional reason to add that?

danman113 avatar Nov 25 '21 06:11 danman113

@jarikomppa any thoughts on this?

danman113 avatar Dec 21 '21 08:12 danman113

Header should be included because cmake can generate the project for Visual Studio or Xcode as instance. The reason to include - is that the developer can access this header from IDE and at least can see that it's presented in the project.

PS If you compile some program like g++ main.cpp you should not pass headers (which main.cpp uses) of course

PPS Imaging the header-only library and how it will be presented in the IDE after cmake-generator phase ;^)

valid-ptr avatar Dec 21 '21 12:12 valid-ptr

Header should be included because cmake can generate the project for Visual Studio or Xcode as instance. The reason to include - is that the developer can access this header from IDE and at least can see that it's presented in the project.

PS If you compile some program like g++ main.cpp you should not pass headers (which main.cpp uses) of course

PPS Imaging the header-only library and how it will be presented in the IDE after cmake-generator phase ;^)

Got it, thanks for the explanation! I went ahead and added it to BACKENDS_SOURCES

danman113 avatar Dec 24 '21 22:12 danman113

Bump?

danman113 avatar Jan 08 '22 02:01 danman113

Monthly Bump

danman113 avatar Feb 14 '22 03:02 danman113

Bi-annual Bump

danman113 avatar May 21 '22 00:05 danman113

I'm running into this issue using CMake, thanks for making this PR! I guess I'll switch to your fork until it gets merged.

TheSunCat avatar Jul 26 '22 16:07 TheSunCat

I'm running into this issue using CMake, thanks for making this PR! I guess I'll switch to your fork until it gets merged.

Glad I could help!

danman113 avatar Aug 07 '22 03:08 danman113