Commit 69d5f433 authored by Iñigo Martínez's avatar Iñigo Martínez

meson: Change build options

Following the new meson porting guidelines, this patch renames the
build options as follows:

- Remove the 'enable' prefix from boolean options.
- The character separator in multi-word options has been changed
  to underscore.

The `debug` and `strict-cc` options have also been removed because
they can be enabled by using meson's options.

https://bugzilla.gnome.org/show_bug.cgi?id=791421
parent b23671c4
......@@ -50,8 +50,8 @@ data_dir = join_paths (get_option ('prefix'), get_option ('datadir'))
locale_dir = join_paths (data_dir, '/locale')
conf = configuration_data ()
conf.set_quoted ('DISTRIBUTOR_NAME', get_option ('distributor-name'))
conf.set_quoted ('DISTRIBUTOR_VERSION', get_option ('distributor-version'))
conf.set_quoted ('DISTRIBUTOR_NAME', get_option ('distributor_name'))
conf.set_quoted ('DISTRIBUTOR_VERSION', get_option ('distributor_version'))
conf.set_quoted ('PACKAGE_NAME', meson.project_name ())
conf.set_quoted ('PACKAGE_TARNAME', meson.project_name ())
conf.set_quoted ('PACKAGE_VERSION', meson.project_version ())
......@@ -63,7 +63,7 @@ conf.set_quoted ('LOCALEDIR', locale_dir)
conf.set('PACKAGE_BUGREPORT', '"https://bugzilla.gnome.org/enter_bug.cgi?product=gnome-boxes"')
if govirt.found()
conf.set10 ('HAVE_OVIRT', get_option ('enable-ovirt'))
conf.set10 ('HAVE_OVIRT', get_option ('ovirt'))
endif
configure_file (output: 'config.h', configuration: conf)
......
option ('distributor-name',
option ('distributor_name',
type: 'string',
value: 'GNOME',
description: 'Distributor name used in HTTP user agent')
option ('distributor-version',
option ('distributor_version',
type: 'string',
value: '3',
description: 'Distributor version used in HTTP user agent')
option ('enable-ovirt',
option ('ovirt',
type: 'boolean',
value: true)
option ('enable-debug',
type: 'boolean',
value: false)
option ('enable-strict-cc',
type: 'boolean',
value: false)
......@@ -77,7 +77,7 @@ vala_sources = [
]
if govirt.found ()
if get_option ('enable-ovirt')
if get_option ('ovirt')
vala_sources += [
'ovirt-broker.vala',
'ovirt-machine.vala',
......@@ -106,10 +106,6 @@ vala_args = [
'--gresources', resource_files,
]
if get_option ('enable-debug')
vala_args += '-g'
endif
dependencies = [
glib,
gio,
......@@ -133,7 +129,7 @@ dependencies = [
]
if govirt.found()
if get_option ('enable-ovirt')
if get_option ('ovirt')
dependencies += govirt
endif
endif
......@@ -146,14 +142,10 @@ c_args = [
'-DG_LOG_DOMAIN="Boxes"',
]
if get_option ('enable-debug')
if get_option ('buildtype').contains ('debug')
c_args += ['-O0', '-ggdb3']
endif
if get_option ('enable-strict-cc')
c_args += ['-Wall', '-Werror']
endif
executable ('gnome-boxes', boxes_sources,
include_directories: config_h_dir,
vala_args: vala_args,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment