[gnome-software: 2/13] build: Add a libgnomesoftware_dep internal dependency




commit 602855055bb4dbb8e864c3a9f54e2a19c7cc52aa
Author: Philip Withnall <pwithnall endlessos org>
Date:   Tue Jan 26 16:36:37 2021 +0000

    build: Add a libgnomesoftware_dep internal dependency
    
    This wraps up all the information about how to compile and link against
    libgnomesoftware so that it can be used without separately listing the
    includes, linker flags, built sources, etc.
    
    This will be used in subsequent commits to tidy up the build system, and
    add `glib-mkenums` support (which is not feasible without it).
    
    Signed-off-by: Philip Withnall <pwithnall endlessos org>

 lib/meson.build | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)
---
diff --git a/lib/meson.build b/lib/meson.build
index 0ef49367..dcf24389 100644
--- a/lib/meson.build
+++ b/lib/meson.build
@@ -45,6 +45,10 @@ if get_option('polkit')
   librarydeps += polkit
 endif
 
+libgnomesoftware_include_directories = [
+  include_directories('..'),
+]
+
 libgnomesoftware = static_library(
   'gnomesoftware',
   sources : [
@@ -64,14 +68,16 @@ libgnomesoftware = static_library(
     'gs-test.c',
     'gs-utils.c',
   ],
-  include_directories : [
-    include_directories('..'),
-  ],
+  include_directories : libgnomesoftware_include_directories,
   dependencies : librarydeps,
   c_args : cargs,
   install: true,
 )
 
+libgnomesoftware_dep = declare_dependency(link_with : libgnomesoftware,
+  include_directories : libgnomesoftware_include_directories
+)
+
 pkg = import('pkgconfig')
 
 pkg.generate(


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