meson: Fix gstreamer-gl-prototypes pkgconfig file on Windows
authorNirbheek Chauhan <nirbheek@centricular.com>
Wed, 2 Sep 2020 16:23:51 +0000 (21:53 +0530)
committerNirbheek Chauhan <nirbheek@centricular.com>
Wed, 2 Sep 2020 16:38:02 +0000 (22:08 +0530)
When we're using wgl, we have to link to `-lopengl32`, not `-lGL`.

Fixes building of anything that uses this pc file, such as the nvcodec
plugin.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/803>

pkgconfig/meson.build

index 8757894..438cb1e 100644 (file)
@@ -58,7 +58,11 @@ if build_gstgl
     if gl_dep.type_name() == 'pkgconfig'
       gl_proto_requires += ' gl'
     elif gl_dep.type_name() == 'library'
-      gl_proto_libs += ' -lGL'
+      if 'wgl' in enabled_gl_platforms
+        gl_proto_libs += ' -lopengl32'
+      else
+        gl_proto_libs += ' -lGL'
+      endif
     elif gl_dep.type_name() == 'appleframework'
       gl_proto_libs += ' -framework OpenGL'
     endif