summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNirbheek Chauhan <nirbheek@centricular.com>2018-07-25 17:17:21 +0530
committerNirbheek Chauhan <nirbheek@centricular.com>2018-07-25 19:32:06 +0530
commitaf94a5550d90b37564043003bb80509f6f384122 (patch)
tree78f48f6c5959fcc0f4547897aad2fb20af55e570
parentff4cca75b213cf87d654e7b6315e29d1344d31f8 (diff)
meson: Convert common options to feature options
The rest will be converted later, these are necessary for gst-build to set options correctly. https://bugzilla.gnome.org/show_bug.cgi?id=795107
-rw-r--r--meson.build12
-rw-r--r--meson_options.txt4
2 files changed, 7 insertions, 9 deletions
diff --git a/meson.build b/meson.build
index ad85f940..f7251ae5 100644
--- a/meson.build
+++ b/meson.build
@@ -1,6 +1,6 @@
project('gst-plugins-ugly', 'c',
version : '1.15.0.1',
- meson_version : '>= 0.46.0',
+ meson_version : '>= 0.47',
default_options : [ 'warning_level=1',
'buildtype=debugoptimized' ])
@@ -119,9 +119,6 @@ cdata.set_quoted('PACKAGE', 'gst-plugins-ugly')
cdata.set_quoted('GST_LICENSE', 'LGPL')
cdata.set_quoted('GETTEXT_PACKAGE', 'gst-plugins-ugly-1.0')
cdata.set_quoted('LOCALEDIR', join_paths(get_option('prefix'), get_option('localedir')))
-if get_option('nls')
- cdata.set('ENABLE_NLS', 1)
-endif
# GStreamer package name and origin url
gst_package_name = get_option('package-name')
@@ -178,8 +175,6 @@ else
cdata.set('DISABLE_ORC', 1)
endif
-configure_file(output : 'config.h', configuration : cdata)
-
ugly_args = ['-DHAVE_CONFIG_H']
configinc = include_directories('.')
libsinc = include_directories('gst-libs')
@@ -252,9 +247,12 @@ subdir('ext')
subdir('tests')
# xgettext is optional (on Windows for instance)
-if get_option('nls') and find_program('xgettext', required : false).found()
+if find_program('xgettext', required : get_option('nls')).found()
+ cdata.set('ENABLE_NLS', 1)
subdir('po')
endif
+configure_file(output : 'config.h', configuration : cdata)
+
python3 = import('python3').find_python()
run_command(python3, '-c', 'import shutil; shutil.copy("hooks/pre-commit.hook", ".git/hooks/pre-commit")')
diff --git a/meson_options.txt b/meson_options.txt
index 939c17d5..38647697 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -2,8 +2,8 @@ option('x264_libraries', type : 'string', value : '',
description : 'Colon separated list of additional x264 library paths, e.g. for 10-bit version')
# Common options
-option('nls', type : 'boolean', value : true, yield: true,
- description : 'Enable native language support (translations)')
+option('nls', type : 'feature', value : 'auto', yield: true,
+ description : 'Enable native language support (translations)')
option('package-name', type : 'string', yield : true,
description : 'package name to use in plugins')
option('package-origin', type : 'string', value : 'Unknown package origin', yield: true,