[gtk/wip/otte/lottie: 1/82] gtk: Build as static library first




commit c815496fe341803280b95f9a396da7ff2373b844
Author: Benjamin Otte <otte redhat com>
Date:   Sun Dec 27 00:28:25 2020 +0100

    gtk: Build as static library first
    
    This allows linking against the static libgtk from the testsuite.
    
    We build the dynamic library by linking all the static libraries into
    the final product.

 gtk/meson.build | 16 +++++++++++++---
 1 file changed, 13 insertions(+), 3 deletions(-)
---
diff --git a/gtk/meson.build b/gtk/meson.build
index 9f07d3d5f0..7cdfe63af5 100644
--- a/gtk/meson.build
+++ b/gtk/meson.build
@@ -1102,14 +1102,24 @@ darwin_versions = [
 ]
 
 # Library
+libgtk_static = static_library('gtk',
+  sources: [typefuncs, gtk_sources, gtkmarshal_h, gtkprivatetypebuiltins_h],
+  dependencies: gtk_deps,
+  include_directories: [confinc, gdkinc, gskinc, gtkinc],
+  c_args: gtk_cargs + common_cflags,
+  link_with: [libgtk_css, libgdk, libgsk, libottie],
+)
+
+libgtk_static_dep = declare_dependency(include_directories: [ confinc, ],
+                                       dependencies: gtk_deps)
+
 libgtk = library('gtk-4',
   soversion: gtk_soversion,
   version: gtk_library_version,
-  sources: [typefuncs, gtk_sources, gtkmarshal_h, gtkprivatetypebuiltins_h],
   c_args: gtk_cargs + common_cflags,
   include_directories: [confinc, gdkinc, gskinc, gtkinc],
-  dependencies: gtk_deps + [libgtk_css_dep, libgdk_dep, libgsk_dep],
-  link_whole: [libgtk_css, libgdk, libgsk, ],
+  dependencies: [libgtk_static_dep, libgtk_css_dep, libgdk_dep, libgsk_dep],
+  link_whole: [libgtk_static, libgtk_css, libgdk, libgsk],
   link_args: common_ldflags,
   darwin_versions: darwin_versions,
   install: true,


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