[vte] build: Define gtk3 min/max version defines only for gtk3 targets
- From: Christian Persch <chpe src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vte] build: Define gtk3 min/max version defines only for gtk3 targets
- Date: Wed, 18 Sep 2019 19:26:36 +0000 (UTC)
commit d3ed7be7ade9d04b85df5af416f80e545228674c
Author: Christian Persch <chpe src gnome org>
Date: Wed Sep 18 21:26:01 2019 +0200
build: Define gtk3 min/max version defines only for gtk3 targets
... instead of globally (which will conflict with gtk4 defines in the future).
meson.build | 8 +++++---
src/app/meson.build | 3 ++-
src/meson.build | 10 +++++++---
3 files changed, 14 insertions(+), 7 deletions(-)
---
diff --git a/meson.build b/meson.build
index 6caea373..bca10a2b 100644
--- a/meson.build
+++ b/meson.build
@@ -124,13 +124,15 @@ ver = glib_max_allowed_version.split('.')
config_h.set('GLIB_VERSION_MAX_ALLOWED', '(G_ENCODE_VERSION(' + ver[0] + ',' + ver[1] + '))')
if get_option('gtk3')
+ gtk3_version_cppflags = []
+
ver = gtk3_min_req_version.split('.')
- config_h.set('GDK_VERSION_MIN_REQUIRED', '(G_ENCODE_VERSION(' + ver[0] + ',' + ver[1] + '))')
+ gtk3_version_cppflags += '-DGDK_VERSION_MIN_REQUIRED=(G_ENCODE_VERSION(' + ver[0] + ',' + ver[1] + '))'
+
ver = gtk3_max_allowed_version.split('.')
- config_h.set('GDK_VERSION_MAX_ALLOWED', '(G_ENCODE_VERSION(' + ver[0] + ',' + ver[1] + '))')
+ gtk3_version_cppflags += '-DGDK_VERSION_MAX_ALLOWED=(G_ENCODE_VERSION(' + ver[0] + ',' + ver[1] + '))'
endif
-
# FIXME AC_USE_SYSTEM_EXTENSIONS also supported non-gnu systems
config_h.set10('_GNU_SOURCE', true)
diff --git a/src/app/meson.build b/src/app/meson.build
index 3c677d8c..03068f32 100644
--- a/src/app/meson.build
+++ b/src/app/meson.build
@@ -44,13 +44,14 @@ if get_option('gtk3')
)
app_gtk3_sources = app_sources + app_gtk3_resource_sources
+ app_gtk3_cppflags = app_common_cppflags + gtk3_version_cppflags
app_gtk3_deps = app_common_deps + [libvte_gtk3_dep]
app_gtk3 = executable(
'vte-' + vte_gtk3_api_version,
app_gtk3_sources,
dependencies: app_gtk3_deps,
- cpp_args: app_common_cppflags,
+ cpp_args: app_gtk3_cppflags,
include_directories: top_inc,
install: true,
)
diff --git a/src/meson.build b/src/meson.build
index f883e513..47527095 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -171,6 +171,7 @@ libvte_common_cppflags = [
if get_option('gtk3')
libvte_gtk3_sources = libvte_common_sources + libvte_gtk3_public_headers + libvte_gtk3_enum_sources
+ libvte_gtk3_cppflags = libvte_common_cppflags + gtk3_version_cppflags
libvte_gtk3_deps = libvte_common_deps + [gtk3_dep]
libvte_gtk3_public_deps = libvte_common_public_deps + [gtk3_dep]
@@ -180,7 +181,7 @@ if get_option('gtk3')
version: libvte_gtk3_soversion,
include_directories: incs,
dependencies: libvte_gtk3_deps,
- cpp_args: libvte_common_cppflags,
+ cpp_args: libvte_gtk3_cppflags,
install: true,
)
@@ -281,7 +282,10 @@ reflect_vte = executable(
'reflect-vte',
sources: reflect_sources,
dependencies: [gtk3_dep, libvte_gtk3_dep],
- c_args: ['-DUSE_VTE', '-DVTE_DISABLE_DEPRECATION_WARNINGS'],
+ c_args: [
+ '-DUSE_VTE',
+ '-DVTE_DISABLE_DEPRECATION_WARNINGS',
+ ],
include_directories: top_inc,
install: false,
)
@@ -296,7 +300,7 @@ xticker = executable(
'xticker',
sources: xticker_sources,
dependencies: [glib_dep],
- c_args: ['-DVTE_DISABLE_DEPRECATION_WARNINGS'],
+ c_args: ['-DVTE_DISABLE_DEPRECATION_WARNINGS',],
include_directories: top_inc,
install: false,
)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]