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: Use a partial dependency to pass EGL module flags #71

Merged
merged 1 commit into from
Sep 16, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
meson: Use a partial dependency to pass EGL module flags
Make Meson try to always find an "egl" dependency, if found extract
the include directories and compiler flags from ir using a partial
dependency, otherwise check that at least EGL/eglplatform.h is
available when the pkg-config module is not found.

Fixes #70
  • Loading branch information
aperezdc committed Sep 15, 2020
commit ef496c580efcc97d165f6d8f409fec7e2ad8bda5
12 changes: 10 additions & 2 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,16 @@ dependencies = [
]

cc = meson.get_compiler('c')
if not cc.has_header('EGL/eglplatform.h')
dependencies += dependency('egl')
egl_dep = dependency('egl', required: false)
if egl_dep.found()
dependencies += egl_dep.partial_dependency(
compile_args: true,
includes: true,
)
else
assert(cc.has_header('EGL/eglplatform.h'),
'Required header <EGL/eglplatform.h> not found'
)
endif

if not cc.has_function('dlopen')
Expand Down