[Mesa-dev] [PATCH 5/7] meson: build src/glx/windows

Dylan Baker dylan at pnwbakers.com
Wed Nov 29 17:30:50 UTC 2017


Quoting Jon Turney (2017-11-29 08:23:00)
> On 27/11/2017 18:35, Dylan Baker wrote:
> > Quoting Jon Turney (2017-11-27 05:58:32)
> >> ---
> >>   src/glx/meson.build         | 25 +++++++++++++----------
> >>   src/glx/windows/meson.build | 48 +++++++++++++++++++++++++++++++++++++++++++++
> >>   2 files changed, 63 insertions(+), 10 deletions(-)
> >>   create mode 100644 src/glx/windows/meson.build
> 
> >> +  extra_deps_libgl = [
> >> +    meson.get_compiler('c').find_library('gdi32'),
> >> +    meson.get_compiler('c').find_library('opengl32')
> > 
> > You should (though I haven't tested), be able to replace the last call with:
> > dependency('opengl')
> > 
> > (There is code for this in meson, but there's a lot of TODO's around it).
> 
> I'm not sure that's a good idea.  I did go back and forth a bit on just 
> using '-lopengl32' here...
> 
> It probably helps to bear in mind that this is building a big shim, 
> where the GL calls from a GLX client are ultimately directed to the 
> native Windows opengl32.dll
> 
> (mainly this happens via a dispatch table populated using 
> _glapi_create_table_from_handle() on a handle to opengl32.dll, but there 
> are some direct calls, for probably not very good reasons)
> 
> So, it's quite important that opengl32 is linked with here, not just any 
> libGL (e.g. an installed version of what we are building...)

Then `dependency('opengl', method : 'system')` should do what you want, but I'm
okay with leaving this as-is for now too, we can always revisit it later.

With the other things fixed:
Reviewed-by: Dylan Baker <dylan at pnwbakers.com>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: signature
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20171129/9632872a/attachment.sig>


More information about the mesa-dev mailing list