Commit c1924cf8 authored by Adrien Plazas's avatar Adrien Plazas Committed by Guido Gunther

meson: Make introspection and the Glade catalog features

This avoids having to disable them when their dependencies aren't
available and it will allow to disable them properly when libhandy will
be allowed to be built as a static library in the next commit.
parent e9172076
......@@ -24,8 +24,8 @@
"builddir": true,
"build-options": "examples",
"config-opts": [
"-Dglade_catalog=false",
"-Dintrospection=false",
"-Dglade_catalog=disabled",
"-Dintrospection=disabled",
"-Dtests=false",
"-Dvapi=false"
],
......
if get_option('glade_catalog')
if glade_catalog
glade_xml = 'libhandy.xml'
gladeui_dep = dependency('gladeui-2.0')
module_dir = gladeui_dep.get_pkgconfig_variable('moduledir')
dtd = join_paths(meson.current_source_dir(), 'glade-catalog.dtd')
glade_catalogdir = gladeui_dep.get_pkgconfig_variable('catalogdir')
......
......@@ -118,6 +118,13 @@ else
vapidir = join_paths(get_option('datadir'), 'vala', 'vapi')
endif
glade_catalog_feature = get_option('glade_catalog')
gladeui_dep = dependency('gladeui-2.0', required : glade_catalog_feature)
glade_catalog = gladeui_dep.found()
introspection_feature = get_option('introspection')
introspection = introspection_feature.enabled() or introspection_feature.auto()
gnome = import('gnome')
subdir('src')
......@@ -143,9 +150,9 @@ summary = [
' Tests: @0@'.format(get_option('tests')),
' Examples: @0@'.format(get_option('examples')),
' Documentation: @0@'.format(get_option('gtk_doc')),
' Introspection: @0@'.format(get_option('introspection')),
' Introspection: @0@'.format(introspection),
' Vapi: @0@'.format(get_option('vapi')),
' Glade Catalog: @0@'.format(get_option('glade_catalog')),
' Glade Catalog: @0@'.format(glade_catalog),
'------',
''
]
......
# Performance and debugging related options
option('profiling', type: 'boolean', value: false)
option('introspection', type: 'boolean', value: true)
option('introspection', type: 'feature', value: 'auto')
option('vapi', type: 'boolean', value: true)
# Subproject
......@@ -21,5 +21,5 @@ option('examples',
type: 'boolean', value: true,
description: 'Whether to compile unit tests')
option('glade_catalog', type: 'boolean', value: true,
option('glade_catalog', type: 'feature', value: 'auto',
description: 'Install a glade catalog file')
......@@ -156,7 +156,7 @@ libhandy_dep = declare_dependency(
include_directories: include_directories('.'),
)
if get_option('introspection')
if introspection
libhandy_gir = gnome.generate_gir(libhandy,
sources: libhandy_generated_headers + libhandy_public_headers + libhandy_public_sources,
......
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