Commit 2abaa61b authored by Adrien Plazas's avatar Adrien Plazas Committed by Guido Günther

meson: Don't install if it's a static subproject

parent b6ed4a73
......@@ -45,6 +45,6 @@ gnome.gtkdoc('libhandy',
install_dir: 'libhandy',
content_files: content_files,
html_assets: images,
install: true)
install: installable)
endif
......@@ -17,7 +17,7 @@ example_sources = [
example = executable('example', example_sources,
dependencies: libhandy_dep,
gui_app: true,
install: true,
install: installable,
)
endif
......@@ -120,6 +120,8 @@ endif
static = get_option('static')
installable = not (static and meson.is_subproject())
glade_catalog_feature = get_option('glade_catalog')
if static and glade_catalog_feature.enabled()
error('The Glade Catalog isn’t available for static libhandy.')
......
i18n = import('i18n')
i18n.gettext('libhandy', preset : 'glib')
i18n.gettext('libhandy',
preset : 'glib',
install : installable)
......@@ -18,18 +18,27 @@ version_data.set('HDY_MINOR_VERSION', handy_version_minor)
version_data.set('HDY_MICRO_VERSION', handy_version_micro)
version_data.set('HDY_VERSION', meson.project_version())
hdy_version_h = configure_file(
input: 'hdy-version.h.in',
output: 'hdy-version.h',
install_dir: libhandy_header_dir,
install: true,
configuration: version_data)
# TODO: Once Meson 0.50.0 is required, use this to prevent installation:
# install: installable,
if installable
hdy_version_h = configure_file(
input: 'hdy-version.h.in',
output: 'hdy-version.h',
install_dir: libhandy_header_dir,
configuration: version_data)
else
hdy_version_h = configure_file(
input: 'hdy-version.h.in',
output: 'hdy-version.h',
configuration: version_data)
endif
libhandy_generated_headers = [
]
install_headers(['handy.h'],
subdir: libhandy_header_subdir)
if installable
install_headers(['handy.h'],
subdir: libhandy_header_subdir)
endif
# Filled out in the subdirs
libhandy_public_headers = []
......@@ -40,7 +49,7 @@ hdy_enums = gnome.mkenums('hdy-enums',
h_template: 'hdy-enums.h.in',
c_template: 'hdy-enums.c.in',
sources: hdy_enum_headers,
install_header: true,
install_header: installable,
install_dir: libhandy_header_dir,
)
......@@ -105,7 +114,9 @@ src_sources = [
libhandy_public_headers += files(src_headers)
libhandy_public_sources += files(src_sources)
install_headers(src_headers, subdir: libhandy_header_subdir)
if installable
install_headers(src_headers, subdir: libhandy_header_subdir)
endif
libhandy_sources = [
......@@ -160,7 +171,7 @@ libhandy = build_target(
c_args: libhandy_c_args,
dependencies: libhandy_deps,
include_directories: [ root_inc, src_inc ],
install: true,
install: installable,
link_args: libhandy_link_args,
install_dir: handy_libdir,
target_type: libtype,
......@@ -205,13 +216,15 @@ endif
pkgg = import('pkgconfig')
pkgg.generate(
libraries: [libhandy],
subdirs: libhandy_header_subdir,
version: meson.project_version(),
name: 'Handy',
filebase: 'libhandy-@0@'.format(apiversion),
description: 'Handy Mobile widgets',
requires: 'gtk+-3.0',
install_dir: join_paths(libdir, 'pkgconfig'),
)
if installable
pkgg.generate(
libraries: [libhandy],
subdirs: libhandy_header_subdir,
version: meson.project_version(),
name: 'Handy',
filebase: 'libhandy-@0@'.format(apiversion),
description: 'Handy Mobile widgets',
requires: 'gtk+-3.0',
install_dir: join_paths(libdir, 'pkgconfig'),
)
endif
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