[gedit/zbrown/deteplification-src: 90/633] build: use host_machine.system() instead of GDK windowing targets
- From: Zander Brown <zbrown src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gedit/zbrown/deteplification-src: 90/633] build: use host_machine.system() instead of GDK windowing targets
- Date: Sat, 10 Apr 2021 12:47:54 +0000 (UTC)
commit bf5600f62c4754f01ba9d6637ece126525741b4d
Author: Sébastien Wilmet <swilmet gnome org>
Date: Thu Dec 5 16:49:21 2019 +0100
build: use host_machine.system() instead of GDK windowing targets
To simplify the code.
Not tested on Windows or macOS.
gedit/meson.build | 6 +++---
gedit/resources/meson.build | 3 ++-
meson.build | 18 +++++-------------
plugins/externaltools/data/meson.build | 4 ++--
plugins/meson.build | 2 +-
5 files changed, 13 insertions(+), 20 deletions(-)
---
diff --git a/gedit/meson.build b/gedit/meson.build
index 76d60dd95..6f4614fc6 100644
--- a/gedit/meson.build
+++ b/gedit/meson.build
@@ -132,7 +132,7 @@ libgedit_deps = [
libgd_dep,
]
-if windowing_target == 'quartz'
+if host_machine.system() == 'darwin'
libgedit_sources += files(
'gedit-app-osx.m',
'gedit-file-chooser-dialog-osx.m',
@@ -148,7 +148,7 @@ if windowing_target == 'quartz'
libgedit_deps += [
gtk_mac_integration_dep,
]
-elif windowing_target == 'win32'
+elif host_machine.system() == 'windows'
libgedit_sources += files(
'gedit-app-win32.c',
)
@@ -299,7 +299,7 @@ gedit_sources = [
gedit_c_args = []
-if windowing_target == 'quartz'
+if host_machine.system() == 'darwin'
gedit_c_args += [
'-DOS_OSX=1',
]
diff --git a/gedit/resources/meson.build b/gedit/resources/meson.build
index 476a75bbe..4edb0dc55 100644
--- a/gedit/resources/meson.build
+++ b/gedit/resources/meson.build
@@ -1,5 +1,6 @@
gresource_xml = configuration_data()
-if windowing_targets.contains('quartz')
+
+if host_machine.system() == 'darwin'
gresource_xml.set(
'OS_DEPENDENT_RESOURCE_FILES',
'<file preprocess="xml-stripblanks">gtk/menus-traditional.ui</file>'
diff --git a/meson.build b/meson.build
index 9850bcafc..ef242631c 100644
--- a/meson.build
+++ b/meson.build
@@ -60,7 +60,6 @@ glib_dep = dependency('glib-2.0', version: glib_req)
gobject_dep = dependency('gobject-2.0', version: glib_req)
gmodule_dep = dependency('gmodule-2.0', version: glib_req)
gio_dep = dependency('gio-2.0', version: glib_req)
-gdk_dep = dependency('gdk-3.0', version: gtk_req)
gtk_dep = dependency('gtk+-3.0', version: gtk_req)
gtksourceview_dep = dependency('gtksourceview-4', version: gtksourceview_req)
libpeas_dep = dependency('libpeas-1.0', version: libpeas_req)
@@ -79,17 +78,10 @@ vapigen_dep = dependency('vapigen', version: vala_req, required: false)
python3 = python.find_installation('python3')
# Configurations
-windowing_targets = gdk_dep.get_pkgconfig_variable('targets').split()
-if windowing_targets.contains('quartz')
- windowing_target = 'quartz'
-elif windowing_targets.contains('win32')
- windowing_target = 'win32'
-else
- if not x11_dep.found()
- error('Native dependency \'x11\' not found')
- else
- windowing_target = 'x11'
- endif
+if ((host_machine.system() != 'darwin') and
+ (host_machine.system() != 'windows') and
+ (not x11_dep.found()))
+ error('Native dependency \'x11\' not found.')
endif
config_h = configuration_data()
@@ -147,7 +139,7 @@ active_plugins = [
'time',
]
-if windowing_target == 'win32'
+if host_machine.system() == 'windows'
active_plugins += 'checkupdate'
endif
diff --git a/plugins/externaltools/data/meson.build b/plugins/externaltools/data/meson.build
index 54762fa96..02d5d6cc1 100644
--- a/plugins/externaltools/data/meson.build
+++ b/plugins/externaltools/data/meson.build
@@ -4,11 +4,11 @@ externaltools_tools = [
'send-to-fpaste',
]
-if windowing_target == 'quartz'
+if host_machine.system() == 'darwin'
externaltools_tools += [
'open-terminal-here-osx',
]
-elif windowing_target != 'win32'
+elif host_machine.system() != 'windows'
externaltools_tools += [
'open-terminal-here',
'run-command',
diff --git a/plugins/meson.build b/plugins/meson.build
index af94ab775..f940a5e92 100644
--- a/plugins/meson.build
+++ b/plugins/meson.build
@@ -8,7 +8,7 @@ msgfmt_plugin_cmd = [
'--output=@OUTPUT@'
]
-if windowing_target == 'win32'
+if host_machine.system() == 'windows'
subdir('checkupdate')
endif
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]