[recipes] Build some sources as a static library



commit ce54db67c2b850aca9c6daa3b83e72e37c103fdc
Author: Matthias Clasen <mclasen redhat com>
Date:   Thu Jul 13 20:55:50 2017 -0400

    Build some sources as a static library
    
    This will let us just link the tests with this library,
    instead of the include hack we do now.

 src/meson.build |   14 +++++++++++---
 1 files changed, 11 insertions(+), 3 deletions(-)
---
diff --git a/src/meson.build b/src/meson.build
index d2fd236..2d8b6f3 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -38,6 +38,16 @@ search_provider = gnome.gdbus_codegen('gr-shell-search-provider-dbus',
                                       interface_prefix: 'org.gnome.',
                                       namespace: 'Gr')
 
+libsrc = [
+       'gr-number.c',
+       'gr-unit.c',
+       'gr-utils.c'
+]
+
+librecipes = static_library('recipes', libsrc,
+                            install : false,
+                            include_directories : top_inc,
+                            dependencies: deps)
 
 src += ['main.c',
        'gr-about-dialog.c',
@@ -75,7 +85,6 @@ src += ['main.c',
        'gr-mail.c',
        'gr-meal.c',
        'gr-meal-row.c',
-       'gr-number.c',
        'gr-query-editor.c',
        'gr-recipe.c',
        'gr-recipe-exporter.c',
@@ -97,8 +106,6 @@ src += ['main.c',
        'gr-time-widget.c',
        'gr-timer.c',
        'gr-timer-widget.c',
-       'gr-unit.c',
-       'gr-utils.c',
        'gr-window.c',
   enums,
   search_provider,
@@ -106,6 +113,7 @@ src += ['main.c',
 
 executable('gnome-recipes',
            src,
+           link_with: librecipes,
            install : true,
            include_directories : top_inc,
            dependencies: deps)


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