Commit 8f454cb4 authored by Emmanuele Bassi's avatar Emmanuele Bassi 👣

Merge branch 'glib-fallback' into 'master'

Updates to Meson build system

See merge request !13
parents 816aa8dd 30f93b8e
Pipeline #53160 passed with stage
in 2 minutes and 12 seconds
if get_option('docs')
if find_program('gtkdoc-scan', required : get_option('gtk_doc')).found()
subdir('xml')
private_headers = [
......
......@@ -76,7 +76,7 @@ json_lib = library(
version: libversion,
soversion: soversion,
include_directories: root_dir,
dependencies: [ gio_dep, gobject_dep, ],
dependencies: [gio_dep],
c_args: json_c_args + common_cflags,
link_args: common_ldflags,
install: true,
......@@ -93,8 +93,8 @@ pkgg.generate(
requires: 'gio-2.0',
)
build_gir = get_option('introspection')
if build_gir
gir = find_program('g-ir-scanner', required : get_option('introspection'))
if gir.found()
gir_args = [
'--quiet',
'--c-include=json-glib/json-glib.h',
......@@ -121,7 +121,7 @@ endif
json_glib_dep = declare_dependency(
link_with: json_lib,
include_directories: root_dir,
dependencies: [ gobject_dep, gio_dep, ],
dependencies: [gio_dep],
sources: [ json_enum_types_h, json_glib_gir ],
)
......
......@@ -5,7 +5,7 @@ project('json-glib', 'c', version: '1.5.1',
'buildtype=debugoptimized',
'c_std=c99',
],
meson_version: '>= 0.44.0')
meson_version: '>= 0.47.0')
# Versioning
json_version = meson.project_version()
......@@ -34,8 +34,8 @@ json_libexecdir = join_paths(get_option('prefix'), get_option('libexecdir'))
# Dependencies
glib_req_version = '>= 2.44.0'
gobject_dep = dependency('gobject-2.0', version: glib_req_version)
gio_dep = dependency('gio-2.0', version: glib_req_version)
gio_dep = dependency('gio-2.0', version: glib_req_version,
fallback: ['glib', 'libgio_dep'])
# Configurations
cc = meson.get_compiler('c')
......@@ -132,11 +132,11 @@ common_cflags = cc.get_supported_arguments(test_cflags)
common_ldflags = []
if host_system == 'linux'
foreach ldflag: [ '-Wl,-Bsymbolic', '-Wl,-z,relro', '-Wl,-z,now', ]
if cc.has_argument(ldflag)
common_ldflags += ldflag
endif
endforeach
common_ldflags += cc.get_supported_link_arguments([
'-Wl,-Bsymbolic',
'-Wl,-z,relro',
'-Wl,-z,now',
])
endif
# Maintain compatibility with autotools
......@@ -151,7 +151,7 @@ root_dir = include_directories('.')
gnome = import('gnome')
python3 = import('python3').find_python()
python3 = import('python').find_installation()
gen_installed_test = files('build-aux/gen-installed-test.py')
subdir('json-glib')
......
option('introspection',
type: 'boolean', value: true,
type: 'feature', value: 'auto', yield: true,
description: 'Build the introspection data (requires gobject-introspection)')
option('docs',
type: 'boolean', value: false,
option('gtk_doc',
type: 'feature', value: 'auto', yield: true,
description: 'Build the API reference (requires gtk-doc)')
option('man',
type: 'boolean', value: false,
......
[wrap-git]
directory=glib
url=https://gitlab.gnome.org/GNOME/glib.git
push-url=git@gitlab.gnome.org:GNOME/glib.git
revision=master
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