[bijiben/wip/inigomartinez/meson: 7/7] build: Improved meson build port



commit 845dd551998fd7a5f0cf640973815e3e18e5ed3e
Author: Iñigo Martínez <inigomartinez gmail com>
Date:   Tue Jul 4 17:45:01 2017 +0200

    build: Improved meson build port
    
    meson build port has been improved with the following changes:
    * Fixed default project flags on non debug builds.
    * zeitgeist option has been changed to true by default.
    * Removed unused ldflags from libiji.
    * libbiji is built as static library.

 meson.build             |    9 ++++-----
 meson_options.txt       |    2 +-
 src/libbiji/meson.build |   33 +++++++++------------------------
 src/meson.build         |    2 --
 4 files changed, 14 insertions(+), 32 deletions(-)
---
diff --git a/meson.build b/meson.build
index 249eb69..4ad3751 100644
--- a/meson.build
+++ b/meson.build
@@ -99,10 +99,10 @@ if buildtype == 'debug' or buildtype == 'debugoptimized'
       bijiben_flags += [cflag]
     endif
   endforeach
-
-  add_project_arguments(bijiben_flags, language: 'c')
 endif
 
+add_project_arguments(bijiben_flags, language: 'c')
+
 tracker_sparql_dep = dependency('tracker-sparql-1.0', required: false)
 
 if not tracker_sparql_dep.found()
@@ -119,7 +119,6 @@ libgd = subproject(
     'with-tagged-entry=true'
   ]
 )
-
 libgd_dep = libgd.get_variable('libgd_dep')
 
 bijiben_deps = [
@@ -132,9 +131,9 @@ bijiben_deps = [
   dependency('libxml-2.0'),
   dependency('uuid'),
   dependency('webkit2gtk-4.0', version: '>= 2.10'),
-  cc.find_library('m', required: true),
   tracker_sparql_dep,
-  libgd_dep
+  libgd_dep,
+  cc.find_library('m')
 ]
 
 if get_option('enable-zeitgeist')
diff --git a/meson_options.txt b/meson_options.txt
index 96ecfa4..86c3026 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -1,2 +1,2 @@
-option('enable-zeitgeist', type: 'boolean', value: false, description: 'Enable Zeitgeist')
+option('enable-zeitgeist', type: 'boolean', value: true, description: 'Enable Zeitgeist')
 option('enable-update-mimedb', type: 'boolean', value: false, description: 'update-mime-database after 
install')
diff --git a/src/libbiji/meson.build b/src/libbiji/meson.build
index e512fab..08414dd 100644
--- a/src/libbiji/meson.build
+++ b/src/libbiji/meson.build
@@ -26,44 +26,29 @@ sources = files(
   'biji-zeitgeist.c'
 )
 
+marshalers = 'biji-marshalers'
+
 sources += gnome.genmarshal(
-  'biji-marshalers',
-  sources: 'biji-marshalers.list',
+  marshalers,
+  sources: marshalers + '.list',
   prefix: '_biji_marshal'
 )
 
-ldflags = [
-  '-Wl,-Bsymbolic-functions',
-  '-Wl,-z,relro',
-  '-Wl,-z,now'
-]
-
-libbiji_ldflags = []
-
-if host_machine.system().contains('linux')
-  foreach ldflag: ldflags
-    if cc.has_argument(ldflag)
-      libbiji_ldflags += ldflag
-    endif
-  endforeach
-endif
-
-libbiji_cflags = bijiben_flags
+libbiji_cflags = []
 
 if get_option('enable-zeitgeist')
   libbiji_cflags += '-DBUILD_ZEITGEIST'
 endif
 
-libbiji = library(
-  'libbiji',
+libbiji = static_library(
+  'biji',
   sources: sources,
   include_directories: top_inc,
   dependencies: bijiben_deps,
-  c_args: libbiji_cflags,
-  link_args: libbiji_ldflags
+  c_args: libbiji_cflags
 )
 
-libbiji_dep = declare_dependency(
+bijiben_deps += declare_dependency(
   link_with: libbiji,
   include_directories: include_directories('.'),
   dependencies: bijiben_deps
diff --git a/src/meson.build b/src/meson.build
index a7f477b..3813f47 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -32,8 +32,6 @@ sources += gnome.compile_resources(
   c_name: 'bjb'
 )
 
-bijiben_deps += libbiji_dep
-
 executable(
   meson.project_name(),
   sources,


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