Commit 6fd504eb authored by Philip Withnall's avatar Philip Withnall

lib: Explicitly only build a static library when used as a subproject

Due to Meson limitations, it seems that there’s no way to set the
subproject to just build a static library from the parent project (no
way to override the default_options — they apply to the whole project
tree), so we need to do that from within the subproject.
Signed-off-by: Philip Withnall's avatarPhilip Withnall <withnall@endlessm.com>
parent c06e24be
Pipeline #47148 passed with stages
in 11 minutes and 51 seconds
......@@ -17,14 +17,27 @@ libglib_testing_public_deps = [
libglib_testing_include_subdir = join_paths(libglib_testing_api_name, 'libglib-testing')
libglib_testing = library(libglib_testing_api_name,
libglib_testing_sources + libglib_testing_headers,
dependencies: libglib_testing_public_deps,
include_directories: root_inc,
install: not meson.is_subproject(),
version: meson.project_version(),
soversion: libglib_testing_api_version,
)
# FIXME: https://github.com/mesonbuild/meson/issues/2992
if meson.is_subproject()
libglib_testing = static_library(libglib_testing_api_name,
libglib_testing_sources + libglib_testing_headers,
dependencies: libglib_testing_public_deps,
include_directories: root_inc,
install: not meson.is_subproject(),
version: meson.project_version(),
soversion: libglib_testing_api_version,
)
else
libglib_testing = library(libglib_testing_api_name,
libglib_testing_sources + libglib_testing_headers,
dependencies: libglib_testing_public_deps,
include_directories: root_inc,
install: not meson.is_subproject(),
version: meson.project_version(),
soversion: libglib_testing_api_version,
)
endif
libglib_testing_dep = declare_dependency(
link_with: libglib_testing,
include_directories: root_inc,
......@@ -48,4 +61,4 @@ if not meson.is_subproject()
endif
subdir('docs')
subdir('tests')
\ No newline at end of file
subdir('tests')
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