[gnome-builder: 18/139] gstyle: build a static archive for gstyle



commit 8d5388a48b1817891799efa7984ec09cd86ff643
Author: Christian Hergert <chergert redhat com>
Date:   Wed Jan 9 15:08:48 2019 -0800

    gstyle: build a static archive for gstyle
    
    We aren't using gir/typelib/vapi for gstyle, so we don't need to generate
    any of those and also we can build a static archive for linking into our
    final executable.

 src/gstyle/gstyle.map  |  6 ------
 src/gstyle/meson.build | 43 +++++--------------------------------------
 2 files changed, 5 insertions(+), 44 deletions(-)
---
diff --git a/src/gstyle/meson.build b/src/gstyle/meson.build
index 4fe328750..4d8c310fb 100644
--- a/src/gstyle/meson.build
+++ b/src/gstyle/meson.build
@@ -66,6 +66,7 @@ libgstyle_sources = [
   'gstyle-utils.c',
   'gstyle-xyz.c',
   libgstyle_resources[0],
+  libgstyle_resources[1],
 ]
 
 libgstyle_deps = [
@@ -75,24 +76,14 @@ libgstyle_deps = [
   libxml2_dep,
 ]
 
-libgstyle_link_args = []
-if ld_supports_version_script
-libgstyle_link_args += ['-Wl,--version-script=' + join_paths(meson.current_source_dir(), 'gstyle.map')]
-endif
-
-libgstyle = shared_library('gstyle-private', libgstyle_sources,
+libgstyle = static_library('gstyle-private', libgstyle_sources,
   dependencies: libgstyle_deps,
-     link_args: libgstyle_link_args,
-        c_args: release_args,
-  link_depends: 'gstyle.map',
-       version: '0.0.0',
-       install: true,
-   install_dir: pkglibdir,
+        c_args: hidden_visibility_args + release_args,
 )
 
 libgstyle_dep = declare_dependency(
-  link_with: libgstyle,
-  dependencies: libgstyle_deps,
+           link_whole: libgstyle,
+         dependencies: libgstyle_deps,
   include_directories: include_directories('.'),
 )
 
@@ -131,28 +122,4 @@ libgstyle_introspection_sources = [
   'gstyle-xyz.c',
 ]
 
-libgstyle_gir = gnome.generate_gir(libgstyle,
-              sources: libgstyle_introspection_sources,
-            nsversion: '1.0',
-            namespace: 'Gstyle',
-        symbol_prefix: 'gstyle',
-    identifier_prefix: 'Gstyle',
-             includes: ['Gdk-3.0', 'Gio-2.0', 'Gtk-3.0', 'GtkSource-4'],
-              install: true,
-      install_dir_gir: pkggirdir,
-  install_dir_typelib: pkgtypelibdir,
-           extra_args: [ '--c-include=gstyle-private.h' ],
-)
-
-if get_option('with_vapi')
-
-  libgstyle_vapi = gnome.generate_vapi('gstyle-private',
-        sources: libgstyle_gir[0],
-       packages: ['gio-2.0', 'gtk+-3.0', 'gtksourceview-4'],
-        install: true,
-    install_dir: pkgvapidir,
-  )
-
-endif
-
 subdir('tests')


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