Commit d47f30b1 authored by Philip Withnall's avatar Philip Withnall

Merge branch 'submodule' into 'master'

build: Don’t install things if used as a subproject

See merge request !5
parents ec824c49 30bcc39c
Pipeline #45826 passed with stages
in 15 minutes and 43 seconds
......@@ -20,5 +20,5 @@ gnome.gtkdoc('libglib-testing',
'--ignore-decorators=G_GNUC_WARN_UNUSED_RESULT',
'--ignore-headers=' + ' '.join(['tests']),
],
install: true,
install: not meson.is_subproject(),
)
\ No newline at end of file
libglib_testing_api_version = '0'
libglib_testing_api_name = 'gsystemservice-' + libglib_testing_api_version
libglib_testing_api_name = 'glib-testing-' + libglib_testing_api_version
libglib_testing_sources = [
'signal-logger.c',
]
......@@ -19,7 +19,7 @@ libglib_testing = library(libglib_testing_api_name,
libglib_testing_sources + libglib_testing_headers,
dependencies: libglib_testing_public_deps,
include_directories: root_inc,
install: true,
install: not meson.is_subproject(),
version: meson.project_version(),
soversion: libglib_testing_api_version,
)
......@@ -29,19 +29,21 @@ libglib_testing_dep = declare_dependency(
)
# Public library bits.
install_headers(libglib_testing_headers,
subdir: libglib_testing_include_subdir,
)
if not meson.is_subproject()
install_headers(libglib_testing_headers,
subdir: libglib_testing_include_subdir,
)
pkgconfig.generate(
libraries: [ libglib_testing ],
subdirs: libglib_testing_api_name,
version: meson.project_version(),
name: 'libglib-testing',
filebase: libglib_testing_api_name,
description: 'libglib-testing provides test harnesses and mock classes.',
requires: libglib_testing_public_deps,
)
pkgconfig.generate(
libraries: [ libglib_testing ],
subdirs: libglib_testing_api_name,
version: meson.project_version(),
name: 'libglib-testing',
filebase: libglib_testing_api_name,
description: 'libglib-testing provides test harnesses and mock classes.',
requires: libglib_testing_public_deps,
)
endif
subdir('docs')
subdir('tests')
\ No newline at end of file
......@@ -90,7 +90,7 @@ test_c_args = [
cc = meson.get_compiler('c')
add_project_arguments(cc.get_supported_arguments(test_c_args), language: 'c')
enable_installed_tests = get_option('installed_tests')
enable_installed_tests = get_option('installed_tests') and not meson.is_subproject()
test_template = files('template.test.in')
test_env = [
'G_DEBUG=gc-friendly,fatal-warnings',
......
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