-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Fix USE_SYSTEM_OPENAL to use system headers #17163
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Does anyone know why macOS can't find the OpenAL headers? but it's still failing: |
Try setting -DUSE_SYSTEM_OPENAL=OFF in the build-mac.sh and build-mac-arm64.sh scripts. |
Thank you, that fixed it. |
Yeah since it's a default we should figure out why it's not including the headers on Mac. |
And you should revert the build.sh hacks we added, since the CI should be testing defaults. |
Apparently, macOS does not provide
Maybe |
Is there a benefit to USE_SYSTEM_OPENAL? it can be dropped altogether otherwise.
|
In general, on Linux, it's preferred to have the option to use system libraries instead of bundled ones.
This might not be as important on Windows or macOS, though. |
Yeah let's change the default of USE_SYSTEM_OPENAL on Windows and Mac to use false and keep it as true on Linux |
Even when USE_SYSTEM_OPENAL was enabled, the code directly included the bundled OpenAL headers, bypassing the system headers. Since `#include <AL/al.h>` is not portable, use `#include "al.h"` instead. https://cmake.org/cmake/help/latest/module/FindOpenAL.html
On Linux, using system libraries is generally preferred, but this is less relevant on macOS and Windows. In particular, macOS does not provide "alext.h" in its OpenAL framework, which causes the build to fail.
If it fails on MacOS, force it being disabled instead of being an option. |
We don't want to disable, the user could install openal via brew in which case it would build fine |
Even when USE_SYSTEM_OPENAL was enabled, the code directly included the bundled OpenAL headers, bypassing the system headers.
Since
#include <AL/al.h>
is not portable, use#include "al.h"
instead.https://cmake.org/cmake/help/latest/module/FindOpenAL.html