[libsoup/wip/meson: 49/93] Implement the GNOME support



commit 415eee7b15aadd4d803316252793628b2392e9af
Author: Tomas Popela <tpopela redhat com>
Date:   Wed Oct 4 15:20:04 2017 +0200

    Implement the GNOME support

 libsoup/meson.build |   25 +++++++++++++++++++++++++
 meson.build         |   16 ++++++++++++++++
 meson_options.txt   |    1 +
 3 files changed, 42 insertions(+), 0 deletions(-)
---
diff --git a/libsoup/meson.build b/libsoup/meson.build
index 9390364..3c6d391 100644
--- a/libsoup/meson.build
+++ b/libsoup/meson.build
@@ -128,6 +128,18 @@ soup_headers = [
   'soup-xmlrpc-old.h',
 ]
 
+soup_gnome_sources = [
+  'soup-cookie-jar-sqlite.c',
+  'soup-gnome-features.c',
+  'soup-proxy-resolver-gnome.c',
+  'soup-password-manager-gnome.c'
+]
+
+soup_gnome_headers = [
+  'soup-proxy-resolver-gnome.h',
+  'soup-password-manager-gnome.h'
+]
+
 includedir = 'libsoup-@0@/libsoup'.format(apiversion)
 install_headers(soup_headers, subdir : includedir)
 
@@ -174,3 +186,16 @@ libsoup = library('soup-@0@'.format(apiversion), soup_sources,
 
 libsoup_dep = declare_dependency(link_with : libsoup,
     include_directories : configinc)
+
+if cdata.get('BUILD_LIBSOUP_GNOME')
+  includedir = 'libsoup-gnome-@0@/libsoup'.format(apiversion)
+  install_headers(soup_gnome_headers, subdir : includedir)
+
+  libsoup_gnome = library('soup-gnome-@0@'.format(apiversion), soup_gnome_sources,
+      version : libversion,
+      soversion : soversion,
+      c_args : libsoup_c_args,
+      include_directories : [configinc],
+      install : true,
+      dependencies : [glib_dep, libxml_dep, sqlite_dep, libsoup_dep])
+endif
diff --git a/meson.build b/meson.build
index 8550d08..90b85c6 100644
--- a/meson.build
+++ b/meson.build
@@ -163,6 +163,15 @@ if host_machine.system() != 'windows'
   endif
 endif
 
+#################
+# GNOME support #
+#################
+enable_gnome = get_option('enable-gnome')
+if host_machine.system() == 'windows'
+  enable_gnome = false
+endif
+cdata.set('BUILD_LIBSOUP_GNOME', enable_gnome)
+
 configinc = include_directories('.')
 
 prefix = get_option('prefix')
@@ -187,6 +196,13 @@ configure_file(output : 'libsoup-2.4.pc',
     configuration : pkgconf,
     install_dir : pkg_install_dir)
 
+if enable_gnome
+  configure_file(output : 'libsoup-gnome-2.4.pc',
+      input : 'libsoup-gnome-2.4.pc.in',
+      configuration : pkgconf,
+      install_dir : pkg_install_dir)
+endif
+
 subdir('libsoup')
 subdir('examples')
 subdir('tests')
diff --git a/meson_options.txt b/meson_options.txt
index 5ede4df..fafb538 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -3,3 +3,4 @@ option('krb5-config', type : 'string', value : '', description : 'Where to look
 option('enable-ntlm', type : 'boolean', value : false, description : 'Build with NTLM support')
 option('ntlm-auth', type : 'string', value : '', description : 'Where to look for ntlm_auth, path points to 
ntlm_auth installation (defaultly looking in PATH)')
 option('enable-tls-check', type : 'boolean', value : true, description : 'Enable TLS support through 
glib-networking. If you are building a package, you can disable this to allow building libsoup anyway (since 
glib-networking is not actually required at compile time), but you should be sure to add a runtime dependency 
on it.')
+option('enable-gnome', type : 'boolean', value : true, description : 'Build libsoup with GNOME support.')


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]