Commit Graph

63 Commits

Author SHA1 Message Date
David Reid 7cbb204abb CMake: Experiment to make it easier to check if a backend is enabled. 2025-12-31 20:17:46 +10:00
David Reid 0e6eaae06b CMake: Don't compile the the PipeWire backend if device IO is disabled. 2025-12-31 19:34:58 +10:00
David Reid c6429bb866 Try fixing a CMake error. 2025-12-31 19:24:16 +10:00
David Reid 552cf613b3 PipeWire: Add support for disabling runtime linking. 2025-12-31 18:19:52 +10:00
David Reid a16756ec3b Add an example for single-threaded mode. 2025-12-30 09:26:38 +10:00
David Reid 442e9f4db8 Merge branch 'dev' into dev-0.12 2025-12-14 06:48:16 +10:00
Marty f513f462df cmake: add public include directories for extra decoders
It seems that when linking, for example, `miniaudio_libvorbis`, it doesn't add the necessary include directories for use in the project. This is because the include directories were not being added to the target at all.

Here, I fix that by adding them with PUBLIC scope.
2025-12-12 19:12:13 +10:00
David Reid 477020295a Merge branch 'dev' into dev-0.12 2025-11-30 06:01:16 +10:00
David Delassus dbf8e114f9 CMake: make install directives optional 2025-11-29 14:42:38 +10:00
David Reid 63485c2e7d Merge branch 'dev' into dev-0.12 2025-09-11 09:30:16 +10:00
David Reid 6648ed005a Initial commit of the documentation generation tool. 2025-09-10 13:47:00 +10:00
David Reid c3245ee3ca Merge branch 'dev' into dev-0.12 2025-09-10 09:53:01 +10:00
David Reid b306c6a270 Use pkg-config for libvorbis and libopus detection. 2025-09-10 09:51:13 +10:00
David Reid 8030f3bf7b Merge branch 'dev' into dev-0.12 2025-08-23 09:54:51 +10:00
David Reid 70eb06d3bd CMake: Minor fix for pthread and m. 2025-08-23 09:54:32 +10:00
Marcin Serwin 959283f244 Ignore missing library dependencies in CMake
Signed-off-by: Marcin Serwin <marcin@serwin.dev>
2025-08-23 09:45:49 +10:00
David Reid 5384cfaf12 Merge branch 'dev' into dev-0.12 2025-08-23 08:11:38 +10:00
David Reid 1d7d8dfba0 Fix some CMake errors with the Emscripten build. 2025-08-23 08:09:03 +10:00
David Reid f9cb8a3e4d Revert "Expose compile defines in pkg-config file"
This reverts commit a2f92095dc.
2025-08-23 06:09:33 +10:00
David Reid 74aa94d980 Merge branch 'dev' into dev-0.12 2025-08-23 05:50:33 +10:00
David Reid e75a053908 Update CMake script to extract the version from miniaudio.h. 2025-08-23 05:50:15 +10:00
David Reid dda0bd100b Merge branch 'dev' into dev-0.12 2025-08-23 05:46:31 +10:00
Marcin Serwin a2f92095dc Expose compile defines in pkg-config file
Signed-off-by: Marcin Serwin <marcin@serwin.dev>
2025-08-23 05:41:27 +10:00
Marcin Serwin badf36a378 Generate and install pkg-config file
Signed-off-by: Marcin Serwin <marcin@serwin.dev>
2025-08-23 05:41:27 +10:00
Marcin Serwin c9d288c3dc Link linux backends if NO_RUNTIME_LINKING is enabled
Signed-off-by: Marcin Serwin <marcin@serwin.dev>
2025-08-23 05:41:27 +10:00
David Reid 733a3e3ec0 Another attempt at fixing the Emscripten build. 2025-08-22 12:29:51 +10:00
David Reid c036a9ff86 Try fixing errors when SDL2 is not found. 2025-08-22 11:12:44 +10:00
David Reid 563f1820cb Improvements to the CMake script for Emscripten. 2025-08-22 09:51:50 +10:00
David Reid c366358ed6 Try fixing a possible Emscripten error with the deviceio test. 2025-08-21 18:16:46 +10:00
David Reid ca3ba8c1a8 Update CMake script to relax build options for examples.
This makes it so examples don't throw annoying warnings, that in order
to fix, would require making the example code unnecessarily untidy.
2025-08-21 15:35:32 +10:00
David Reid cb95cd6521 Force silence a warning in an example. 2025-08-21 14:47:11 +10:00
David Reid 7263de3b64 Delete the PipeWire test.
The PipeWire backend is now tested with the deviceio test.
2025-08-21 14:18:58 +10:00
David Reid f86be65f19 Merge branch 'dev' into dev-0.12 2025-08-20 18:15:54 +10:00
David Reid b7e5451ef4 Try fixing a compilation error when pthread does not exist. 2025-08-20 18:07:59 +10:00
David Reid ba84e61a18 Try fixing a compilation error when libatomic does not exist. 2025-08-20 18:03:12 +10:00
David Reid a7ab58259e Don't try building C++ tests when forcing C89. 2025-08-20 17:36:07 +10:00
David Reid 384afa3a5f Whitespace. 2025-07-21 17:09:09 +10:00
David Reid 397cadbd64 Merge branch 'dev' into dev-0.12 2025-07-21 17:07:08 +10:00
David Reid c48975f4a9 Don't link against dl with NO_RUNTIME_LINKING. 2025-07-21 17:06:34 +10:00
David Reid db9ad08bf0 Merge branch 'dev' into dev-0.12 2025-07-21 17:04:02 +10:00
David Reid 79b4ddc27d Fix CMake script for NetBSD and OpenBSD. 2025-07-21 16:54:27 +10:00
David Reid 377f589a01 Merge branch 'dev' into dev-0.12 2025-07-21 16:51:09 +10:00
Marcin Serwin 0b9f03a376 Respect CMAKE_INSTALL_INCLUDEDIR when installing headers
Signed-off-by: Marcin Serwin <marcin@serwin.dev>
2025-07-21 16:48:25 +10:00
Marcin Serwin 140b9c7f9f Add compile define for specific backends only in CMake
Fixes https://github.com/mackron/miniaudio/pull/1010#issuecomment-3093830252

Signed-off-by: Marcin Serwin <marcin@serwin.dev>
2025-07-21 16:47:46 +10:00
Marcin Serwin ac8c908283 Don't force static libraries
The default for creating libraries is static but can be overridden
by setting BUILD_SHARED_LIBS variable. Setting it explicitly makes it
impossible to override.

https://cmake.org/cmake/help/latest/variable/BUILD_SHARED_LIBS.html

Signed-off-by: Marcin Serwin <marcin@serwin.dev>
2025-07-21 16:47:03 +10:00
David Reid 110ded6fc6 Include the SDL2 and PipeWire backends in the deviceio test. 2025-07-21 16:11:31 +10:00
David Reid 51715474d7 CMake: Improve handling of dl. 2025-07-15 08:12:36 +10:00
David Reid 1e6c01f31d Fix CMake script for NetBSD. 2025-07-15 07:20:52 +10:00
David Reid 96eea50e7d Remove references to the custom backend from the CMake script. 2025-07-15 06:59:55 +10:00
David Reid 2833ccf4e7 Whitespace. 2025-07-15 06:59:36 +10:00