diff options
author | Nirbheek Chauhan <nirbheek@centricular.com> | 2018-08-07 20:42:34 +0530 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2018-08-09 18:39:19 +0300 |
commit | c69030c123e32f1f11d3dfd02a69c4eb5932bf28 (patch) | |
tree | f0a3cfe2d2f3ac9c6c8ea8bc8edadbe5171ea65e /mesonbuild/minstall.py | |
parent | ab01db177b58fb2b190f9b193b42f2c714322f59 (diff) | |
download | meson-c69030c123e32f1f11d3dfd02a69c4eb5932bf28.zip meson-c69030c123e32f1f11d3dfd02a69c4eb5932bf28.tar.gz meson-c69030c123e32f1f11d3dfd02a69c4eb5932bf28.tar.bz2 |
Don't require an import library for shared modules
Shared modules may be resource-only DLLs, or might automatically
self-initialize using C constructors or WinMain at DLL load time.
When an import library is not found for a shared module, just print
a message about it instead of erroring out.
Fixes #3965
Diffstat (limited to 'mesonbuild/minstall.py')
-rw-r--r-- | mesonbuild/minstall.py | 7 |
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)) |