diff mbox series

[PULL,37/46] meson: get opengl compilation flags from OPENGL_CFLAGS

Message ID 20200907164421.19886-2-pbonzini@redhat.com
State New
Headers show
Series Next round of Meson bugfixes and cleanups | expand

Commit Message

Paolo Bonzini Sept. 7, 2020, 4:44 p.m. UTC
The opengl compilation flags were added to QEMU_CFLAGS.  We do not
want them to be added to all compilation commands, so export them
also via OPENGL_CFLAGS rather than via QEMU_CFLAGS.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 configure   | 1 +
 meson.build | 3 ++-
 2 files changed, 3 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/configure b/configure
index d21fb1e733..e18f3e2156 100755
--- a/configure
+++ b/configure
@@ -7051,6 +7051,7 @@  fi
 
 if test "$opengl" = "yes" ; then
   echo "CONFIG_OPENGL=y" >> $config_host_mak
+  echo "OPENGL_CFLAGS=$opengl_cflags" >> $config_host_mak
   echo "OPENGL_LIBS=$opengl_libs" >> $config_host_mak
   if test "$opengl_dmabuf" = "yes" ; then
     echo "CONFIG_OPENGL_DMABUF=y" >> $config_host_mak
diff --git a/meson.build b/meson.build
index eda2dc8b9e..6a0a645a9c 100644
--- a/meson.build
+++ b/meson.build
@@ -302,7 +302,8 @@  if 'CONFIG_AUDIO_COREAUDIO' in config_host
 endif
 opengl = not_found
 if 'CONFIG_OPENGL' in config_host
-  opengl = declare_dependency(link_args: config_host['OPENGL_LIBS'].split())
+  opengl = declare_dependency(compile_args: config_host['OPENGL_CFLAGS'].split(),
+                              link_args: config_host['OPENGL_LIBS'].split())
 else
 endif
 gtk = not_found