1
0
mirror of https://github.com/ThrowTheSwitch/Unity.git synced 2026-01-25 09:21:36 +01:00

Don't install anything when building as subproject

When a project is consuming unity as as subproject, unity headers,
static library and pkg config files are installed by `meson install`.

This can be fixed by using `meson install --skip-subprojects`, but this
must be repeated in all the distros packaging a project.

Fixed by disabling install when building as a subproject.

Fixes: #661
This commit is contained in:
Nir Soffer
2023-02-21 01:26:54 +02:00
parent 0854f3d2d5
commit 18482abd9e
4 changed files with 30 additions and 22 deletions

View File

@@ -8,8 +8,10 @@
unity_inc += include_directories('.')
unity_src += files('unity.c')
install_headers(
'unity.h',
'unity_internals.h',
subdir: meson.project_name()
)
if not meson.is_subproject()
install_headers(
'unity.h',
'unity_internals.h',
subdir: meson.project_name()
)
endif