Skip to content
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

added preprocessor directive for proper import of opus brew package #12

Closed
wants to merge 1 commit into from

Conversation

dh1tw
Copy link
Contributor

@dh1tw dh1tw commented Feb 28, 2017

Hi,

there seems to be a difference in the installation path where the brew packet manager installs on MacOS the opus library.

While on Linux the import statement:
#include <opus/opus.h>
works fine, in MacOS it doesn't. On MacOS the opus.pc which comes with brew is slightly different and requires the following import:
#include <opus.h>

I added preprocessor directive to check the platform and import the correct opus.h from the correct path.

hraban added a commit that referenced this pull request Feb 28, 2017
pkg-config --cflags always puts you in the opus/ directory where opus.h
directly lives. No need to prefix with opus/. That just happened to work
because it was symlinked into /usr/include/opus, but we don't need to
rely on that now that we're using pkg-config.

Based on Tobias Wellnitz's comment (#12)
@hraban
Copy link
Owner

hraban commented Feb 28, 2017

Hi, thanks for the bug report. You're completely right. In fact, even on Linux, we don't need opus/: it just happens to work because opus/ happens to live in /usr/include. But pkg-config puts us in the bare opus/ directory, and since we're using pkg-config --cflags for this, we can completely trust that, instead. I've fixed it in another PR (#13), so I'm closing this one.

Thanks again 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants