mirror of https://github.com/xemu-project/xemu.git
configure, meson: Eliminate redundant gtk check
This commit is contained in:
parent
c3e9fb14a5
commit
6cc30513ac
|
@ -1562,29 +1562,6 @@ if test "$opengl" != "no" ; then
|
|||
QEMU_CFLAGS="$QEMU_CFLAGS $opengl_cflags"
|
||||
fi # test "$opengl" != "no"
|
||||
|
||||
##########################################
|
||||
# gtk probe
|
||||
|
||||
# Depend on GTK for native file dialog boxes
|
||||
# FIXME: Add fallback when GTK is unavailable
|
||||
xemu_gtk="no"
|
||||
if test "$linux" = "yes" ; then
|
||||
xemu_gtk="yes"
|
||||
fi
|
||||
|
||||
# FIXME: Remove duplication with existing GTK detection
|
||||
if test "$xemu_gtk" != "no"; then
|
||||
gtkpackage="gtk+-3.0"
|
||||
gtkversion="3.14.0"
|
||||
if $pkg_config --exists "$gtkpackage >= $gtkversion"; then
|
||||
xemu_gtk_cflags=$($pkg_config --cflags $gtkpackage)
|
||||
xemu_gtk_libs=$($pkg_config --libs $gtkpackage)
|
||||
xemu_gtk_version=$($pkg_config --modversion $gtkpackage)
|
||||
elif test "$xemu_gtk" = "yes"; then
|
||||
feature_not_found "gtk" "Install gtk3-devel"
|
||||
fi
|
||||
fi
|
||||
|
||||
##########################################
|
||||
# openssl probe
|
||||
if $pkg_config --exists openssl; then
|
||||
|
@ -2458,9 +2435,6 @@ if test "$have_tsan" = "yes" && test "$have_tsan_iface_fiber" = "yes" ; then
|
|||
echo "CONFIG_TSAN=y" >> $config_host_mak
|
||||
fi
|
||||
|
||||
echo "XEMU_GTK_CFLAGS=$xemu_gtk_cflags" >> $config_host_mak
|
||||
echo "XEMU_GTK_LIBS=$xemu_gtk_libs" >> $config_host_mak
|
||||
|
||||
echo "OPENSSL_CFLAGS=$openssl_cflags" >> $config_host_mak
|
||||
echo "OPENSSL_LIBS=$openssl_libs" >> $config_host_mak
|
||||
|
||||
|
|
11
meson.build
11
meson.build
|
@ -1181,9 +1181,6 @@ toml = declare_dependency(compile_args: ['-DTOML_HEADER_ONLY=0'],
|
|||
|
||||
genconfig = declare_dependency(include_directories: 'genconfig')
|
||||
|
||||
xemu_gtk = declare_dependency(compile_args: config_host['XEMU_GTK_CFLAGS'].split(),
|
||||
link_args: config_host['XEMU_GTK_LIBS'].split())
|
||||
|
||||
openssl = declare_dependency(compile_args: config_host['OPENSSL_CFLAGS'].split(),
|
||||
link_args: config_host['OPENSSL_LIBS'].split())
|
||||
|
||||
|
@ -1283,10 +1280,14 @@ gtkx11 = not_found
|
|||
vte = not_found
|
||||
have_gtk_clipboard = get_option('gtk_clipboard').enabled()
|
||||
|
||||
if not get_option('gtk').auto() or have_system
|
||||
# xemu: GTK is required in Linux builds for file selection interfaces. In the
|
||||
# future, this may be relaxed in the future with alternative options.
|
||||
require_gtk = targetos == 'linux'
|
||||
|
||||
if require_gtk
|
||||
gtk = dependency('gtk+-3.0', version: '>=3.22.0',
|
||||
method: 'pkg-config',
|
||||
required: get_option('gtk'),
|
||||
required: require_gtk,
|
||||
kwargs: static_kwargs)
|
||||
if gtk.found()
|
||||
gtkx11 = dependency('gtk+-x11-3.0', version: '>=3.22.0',
|
||||
|
|
|
@ -177,8 +177,8 @@ option('rdma', type : 'feature', value : 'auto',
|
|||
description: 'Enable RDMA-based migration')
|
||||
option('pvrdma', type : 'feature', value : 'auto',
|
||||
description: 'Enable PVRDMA support')
|
||||
option('gtk', type : 'feature', value : 'auto',
|
||||
description: 'GTK+ user interface')
|
||||
# option('gtk', type : 'feature', value : 'auto',
|
||||
# description: 'GTK+ user interface')
|
||||
option('sdl', type : 'feature', value : 'enabled',
|
||||
description: 'SDL user interface')
|
||||
option('sdl_image', type : 'feature', value : 'auto',
|
||||
|
|
|
@ -38,10 +38,10 @@ xemu_ss.add(xemu_cocoa)
|
|||
endif
|
||||
|
||||
if 'CONFIG_LINUX' in config_host
|
||||
xemu_ss.add(xemu_gtk)
|
||||
xemu_ss.add(gtk)
|
||||
endif
|
||||
|
||||
xemu_ss.add(when: 'CONFIG_LINUX', if_true: [xemu_gtk, files('xemu-os-utils-linux.c')])
|
||||
xemu_ss.add(when: 'CONFIG_LINUX', if_true: [gtk, files('xemu-os-utils-linux.c')])
|
||||
xemu_ss.add(when: 'CONFIG_WIN32', if_true: files('xemu-os-utils-windows.c'))
|
||||
xemu_ss.add(when: 'CONFIG_DARWIN', if_true: files('xemu-os-utils-macos.m'))
|
||||
xemu_ss.add(imgui, implot, stb_image, noc, sdl, opengl, openssl, fa, fpng, json, httplib)
|
||||
|
|
|
@ -33,7 +33,7 @@ implot = declare_dependency(link_with: libimplot,
|
|||
include_directories: 'implot')
|
||||
|
||||
noc_ss = ss.source_set()
|
||||
noc_ss.add(when: 'CONFIG_LINUX', if_true: [xemu_gtk, files('noc_file_dialog/noc_file_dialog_gtk.c')])
|
||||
noc_ss.add(when: 'CONFIG_LINUX', if_true: [gtk, files('noc_file_dialog/noc_file_dialog_gtk.c')])
|
||||
noc_ss.add(when: 'CONFIG_WIN32', if_true: files('noc_file_dialog/noc_file_dialog_win32.cc'))
|
||||
noc_ss.add(when: 'CONFIG_DARWIN', if_true: files('noc_file_dialog/noc_file_dialog_macos.m'))
|
||||
noc_ss = noc_ss.apply(config_all, strict: false)
|
||||
|
|
Loading…
Reference in New Issue