aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/backend/backends.py
diff options
context:
space:
mode:
Diffstat (limited to 'mesonbuild/backend/backends.py')
-rw-r--r--mesonbuild/backend/backends.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/mesonbuild/backend/backends.py b/mesonbuild/backend/backends.py
index 2239fdd..4e470cf 100644
--- a/mesonbuild/backend/backends.py
+++ b/mesonbuild/backend/backends.py
@@ -42,9 +42,6 @@ if T.TYPE_CHECKING:
from ..interpreter import Interpreter, Test
from ..mesonlib import FileMode
- InstallType = T.List[T.Tuple[str, str, T.Optional['FileMode']]]
- InstallSubdirsType = T.List[T.Tuple[str, str, T.Optional['FileMode'], T.Tuple[T.Set[str], T.Set[str]]]]
-
# Languages that can mix with C or C++ but don't support unity builds yet
# because the syntax we use for unity builds is specific to C/++/ObjC/++.
# Assembly files cannot be unitified and neither can LLVM IR files
@@ -1451,7 +1448,12 @@ class Backend:
for h in headers:
outdir = h.get_custom_install_dir()
if outdir is None:
- outdir = os.path.join(incroot, h.get_install_subdir())
+ subdir = h.get_install_subdir()
+ if subdir is None:
+ outdir = incroot
+ else:
+ outdir = os.path.join(incroot, subdir)
+
for f in h.get_sources():
if not isinstance(f, File):
raise MesonException(f'Invalid header type {f!r} can\'t be installed')