diff --git a/configure b/configure index a4ea9d7f8a..1275759feb 100755 --- a/configure +++ b/configure @@ -1548,20 +1548,6 @@ esac ########################################## -# XBOX -if test "$opengl" != "no" ; then - if test "$darwin" = "yes" ; then - opengl_libs="$opengl_libs -framework OpenGL" - elif test "$mingw32" = "yes" ; then - opengl_libs="$opengl_libs -lopengl32 -lgdi32" - elif test "$linux" = "yes" ; then - opengl_libs="$opengl_libs -lGLU -lGL" - fi - opengl_libs="$opengl_libs $($pkg_config --libs epoxy)" - opengl_cflags="$opengl_cflags $($pkg_config --cflags epoxy)" - QEMU_CFLAGS="$QEMU_CFLAGS $opengl_cflags" -fi # test "$opengl" != "no" - # check and set a backend for coroutine # We prefer ucontext, but it's not always possible. The fallback diff --git a/meson.build b/meson.build index 7c7fffd187..e25d414079 100644 --- a/meson.build +++ b/meson.build @@ -1158,14 +1158,20 @@ endif opengl = not_found if not get_option('opengl').auto() or have_system or have_vhost_user_gpu + # FIXME: Use meson's 'gl' dep + if targetos == 'darwin' + opengl_libs=['-framework OpenGL'] + elif targetos == 'windows' + opengl_libs=['-lopengl32', '-lgdi32'] + elif targetos == 'linux' + opengl_libs=['-lGLU', '-lGL'] + endif epoxy = dependency('epoxy', method: 'pkg-config', - required: get_option('opengl'), kwargs: static_kwargs) - #if cc.has_header('epoxy/egl.h', dependencies: epoxy) - opengl = epoxy - # elif get_option('opengl').enabled() - # error('epoxy/egl.h not found') - # endif + required: true, kwargs: static_kwargs) + opengl = declare_dependency(link_args: opengl_libs, + dependencies: epoxy) endif + gbm = not_found if (have_system or have_tools) and (virgl.found() or opengl.found()) gbm = dependency('gbm', method: 'pkg-config', required: false,