aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/minstall.py
diff options
context:
space:
mode:
Diffstat (limited to 'mesonbuild/minstall.py')
-rw-r--r--mesonbuild/minstall.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/mesonbuild/minstall.py b/mesonbuild/minstall.py
index 4615b6d..248f12e 100644
--- a/mesonbuild/minstall.py
+++ b/mesonbuild/minstall.py
@@ -384,6 +384,13 @@ class Installer:
def install_targets(self, d):
for t in d.targets:
+ if not os.path.exists(t.fname):
+ # For example, import libraries of shared modules are optional
+ if t.optional:
+ print('File {!r} not found, skipping'.format(t.fname))
+ continue
+ else:
+ raise RuntimeError('File {!r} could not be found'.format(t.fname))
fname = check_for_stampfile(t.fname)
outdir = get_destdir_path(d, t.outdir)
outname = os.path.join(outdir, os.path.basename(fname))