meson: get opengl compilation flags from OPENGL_CFLAGS
authorPaolo Bonzini <pbonzini@redhat.com>
Tue, 1 Sep 2020 12:41:17 +0000 (08:41 -0400)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 8 Sep 2020 09:43:16 +0000 (11:43 +0200)
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
meson.build

index f2a3a1164c24ecb364daf9e6c5f36c104ac38eaf..1b1a4ce800379ca50c89b48e4a0eb41495920202 100755 (executable)
--- a/configure
+++ b/configure
@@ -7054,6 +7054,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
index 689fc2269c35823ef2dbede8b529cbc2a7ab3b27..071ef2688a33dec390e9e022f12427d982fa6b89 100644 (file)
@@ -307,7 +307,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