[libgnome-volume-control/wip/inigomartinez/meson: 1/8] build: Use meson's options for library type



commit 2875af4bae5c48b72c235de3413d32693615255a
Author: Iñigo Martínez <inigomartinez gmail com>
Date:   Sat Jan 27 08:29:27 2018 +0100

    build: Use meson's options for library type
    
    meson's `default_library` can be used to know the type of library
    to be created, so there is no need to have another option for it.
    
    meson's `default_library` must be used instead of the `static`
    option.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=792948

 meson.build       |    4 ++--
 meson_options.txt |    6 ------
 2 files changed, 2 insertions(+), 8 deletions(-)
---
diff --git a/meson.build b/meson.build
index 68386c3..5819c36 100644
--- a/meson.build
+++ b/meson.build
@@ -1,6 +1,6 @@
 project('gvc', 'c',
   meson_version: '>= 0.38.0',
-  default_options: ['static=true']
+  default_options: 'default_library=static'
 )
 
 if not meson.is_subproject()
@@ -67,7 +67,7 @@ if enable_alsa
 endif
 cdata.set('HAVE_ALSA', enable_alsa)
 
-static = get_option('static')
+static = get_option('default_library') == 'static'
 with_introspection = get_option('with-introspection')
 
 if static and with_introspection
diff --git a/meson_options.txt b/meson_options.txt
index 379a6c7..1db3921 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -28,12 +28,6 @@ option('alsa',
   description: 'Build ALSA support.'
 )
 
-option('static',
-  type: 'boolean',
-  value: false,
-  description: 'Build as a static library.'
-)
-
 option('with-introspection',
   type: 'boolean',
   value: false,


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