[gtk-vnc] build: enable glib/gtk API version usage checking
- From: Daniel P. Berrange <dberrange src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk-vnc] build: enable glib/gtk API version usage checking
- Date: Fri, 8 Jan 2021 15:22:01 +0000 (UTC)
commit ddff6d5b1b8f90ee13fd5146a7d8a4cb8a55cda9
Author: Daniel P. Berrangé <dan berrange com>
Date: Thu Jan 7 13:04:16 2021 +0000
build: enable glib/gtk API version usage checking
Signed-off-by: Daniel P. Berrangé <berrange redhat com>
examples/meson.build | 1 +
meson.build | 12 ++++++++++++
src/meson.build | 3 +++
tools/meson.build | 1 +
4 files changed, 17 insertions(+)
---
diff --git a/examples/meson.build b/examples/meson.build
index 596e390..ebdff41 100644
--- a/examples/meson.build
+++ b/examples/meson.build
@@ -8,6 +8,7 @@ endif
gvncviewer = executable(
'gvncviewer',
sources: ['gvncviewer.c'],
+ c_args: gtk_vnc_version_check_flags,
dependencies: gvncviewer_deps,
install: false,
)
diff --git a/meson.build b/meson.build
index a6cbe3f..aa0d92e 100644
--- a/meson.build
+++ b/meson.build
@@ -55,6 +55,7 @@ endif
# gvnc
glib_min_version = '2.56.0'
+glib_min_version_symbol='GLIB_VERSION_2_56'
gdk_pixbuf_min_version = '2.36.0'
gcrypt_min_version = '1.8.0'
gnutls_min_version = '3.6.0'
@@ -63,6 +64,7 @@ libsasl_min_version = '2.1.27'
# gtk-vnc
gtk_min_version = '3.22.0'
+gtk_min_version_symbol='GDK_VERSION_3_22'
cairo_min_version = '1.15.0'
x11_min_version = '1.6.5'
@@ -102,6 +104,16 @@ if libsasl_dep.found()
conf_data.set('HAVE_SASL', true)
endif
+gvnc_version_check_flags = [
+ '-DGLIB_VERSION_MIN_REQUIRED=@0@'.format(glib_min_version_symbol),
+ '-DGLIB_VERSION_MAX_ALLOWED=@0@'.format(glib_min_version_symbol),
+]
+
+gtk_vnc_version_check_flags = gvnc_version_check_flags + [
+ '-DGDK_VERSION_MIN_REQUIRED=@0@'.format(gtk_min_version_symbol),
+ '-DGDK_VERSION_MAX_ALLOWED=@0@'.format(gtk_min_version_symbol),
+]
+
subproject('keycodemapdb')
keymapgen = files('subprojects/keycodemapdb/tools/keymap-gen')
diff --git a/src/meson.build b/src/meson.build
index d46a621..4e9cabf 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -120,6 +120,7 @@ gvnc = library(
sources: gvnc_sources,
dependencies: gvnc_deps,
include_directories: gvnc_inc,
+ c_args: gvnc_version_check_flags,
link_args: gvnc_link_args,
link_depends: gvnc_syms,
version: '0.0.1',
@@ -204,6 +205,7 @@ if libpulse_dep.found()
sources: gvncpulse_sources,
dependencies: gvncpulse_deps,
include_directories: gvncpulse_inc,
+ c_args: gvnc_version_check_flags,
link_args: gvncpulse_link_args,
link_depends: gvncpulse_syms,
version: '0.0.1',
@@ -368,6 +370,7 @@ gtk_vnc = library(
sources: gtk_vnc_sources,
dependencies: gtk_vnc_deps,
include_directories: gtk_vnc_inc,
+ c_args: gtk_vnc_version_check_flags,
link_args: gtk_vnc_link_args,
link_depends: gtk_vnc_syms,
version: '0.0.2',
diff --git a/tools/meson.build b/tools/meson.build
index 9d752e9..f54e6a5 100644
--- a/tools/meson.build
+++ b/tools/meson.build
@@ -4,6 +4,7 @@ gvnccapture = executable(
'gvnccapture',
dependencies: [gvnc_dep],
sources: ['gvnccapture.c'],
+ c_args: gvnc_version_check_flags,
install: true,
install_dir: gtk_vnc_bindir,
)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]