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

meson: do not add gl to pkg-config file on macOS #156

Merged
merged 1 commit into from
Mar 12, 2018

Conversation

tschoonj
Copy link
Contributor

Even though meson will find the dependency gl on macOS, this does not mean that
there is a pkg-config file for it, as meson does not use pkg-config to
establish its presence. It should therefore not be added to
the libepoxy pkg-config file as a (private) requirement.

@tschoonj
Copy link
Contributor Author

Found that this creates trouble building anything that depends on libepoxy on macOS. I can confirm that this patch fixes the problem.

src/meson.build Outdated
@@ -93,7 +93,7 @@ epoxy_has_wgl = build_wgl ? '1' : '0'
# not needed when building Epoxy; we do want to add them to the generated
# pkg-config file, for consumers of Epoxy
gl_reqs = []
if gl_dep.found()
if gl_dep.found() and host_system != 'darwin'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm pretty sure this will fail on Windows as well.

The appropriate solution would be to check the type of the gl_dep object and adding it only if it's a pkg-config dependency, e.g.

if gl_dep.found() and gl_dep.type_name() == 'pkgconfig'
  gl_reqs += 'gl'
endif

Same goes for the EGL dependency:

if build_egl and egl_dep.found() and egl_dep.type_name() == 'pkgconfig'
  gl_reqs += 'egl'
endif

Even though meson will find the dependency gl on macOS, this does not mean that
there is a pkg-config file for it, as meson does not use pkg-config to
establish its presence. It should therefore not be added to
the libepoxy pkg-config file as a (private) requirement.
@tschoonj
Copy link
Contributor Author

tschoonj commented Mar 4, 2018

Done!

Tested on macOS.

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.

2 participants