aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/backend/backends.py
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2019-10-09 19:50:20 +0300
committerGitHub <noreply@github.com>2019-10-09 19:50:20 +0300
commitf64d9b43802762ec10acf16d719fa261b85079ad (patch)
tree341a544b003f207850ccb934655d54e1a62ac7bf /mesonbuild/backend/backends.py
parent65fc4149c5519f87fc8259bcbf31d923ac52162a (diff)
parent9c456e2baf281682569ce89137148d7b5b3487f5 (diff)
downloadmeson-f64d9b43802762ec10acf16d719fa261b85079ad.zip
meson-f64d9b43802762ec10acf16d719fa261b85079ad.tar.gz
meson-f64d9b43802762ec10acf16d719fa261b85079ad.tar.bz2
Merge pull request #5907 from xhaakon/pdb
Fix *.pdb files missing in meson introspect --installed output
Diffstat (limited to 'mesonbuild/backend/backends.py')
-rw-r--r--mesonbuild/backend/backends.py41
1 files changed, 25 insertions, 16 deletions
diff --git a/mesonbuild/backend/backends.py b/mesonbuild/backend/backends.py
index 4d3f5d9..947be1c 100644
--- a/mesonbuild/backend/backends.py
+++ b/mesonbuild/backend/backends.py
@@ -1091,22 +1091,31 @@ class Backend:
t.get_aliases(), should_strip, mappings,
t.install_rpath, install_mode)
d.targets.append(i)
- # On toolchains/platforms that use an import library for
- # linking (separate from the shared library with all the
- # code), we need to install that too (dll.a/.lib).
- if isinstance(t, (build.SharedLibrary, build.SharedModule, build.Executable)) and t.get_import_filename():
- if custom_install_dir:
- # If the DLL is installed into a custom directory,
- # install the import library into the same place so
- # it doesn't go into a surprising place
- implib_install_dir = outdirs[0]
- else:
- implib_install_dir = self.environment.get_import_lib_dir()
- # Install the import library; may not exist for shared modules
- i = TargetInstallData(self.get_target_filename_for_linking(t),
- implib_install_dir, {}, False, {}, '', install_mode,
- optional=isinstance(t, build.SharedModule))
- d.targets.append(i)
+
+ if isinstance(t, (build.SharedLibrary, build.SharedModule, build.Executable)):
+ # On toolchains/platforms that use an import library for
+ # linking (separate from the shared library with all the
+ # code), we need to install that too (dll.a/.lib).
+ if t.get_import_filename():
+ if custom_install_dir:
+ # If the DLL is installed into a custom directory,
+ # install the import library into the same place so
+ # it doesn't go into a surprising place
+ implib_install_dir = outdirs[0]
+ else:
+ implib_install_dir = self.environment.get_import_lib_dir()
+ # Install the import library; may not exist for shared modules
+ i = TargetInstallData(self.get_target_filename_for_linking(t),
+ implib_install_dir, {}, False, {}, '', install_mode,
+ optional=isinstance(t, build.SharedModule))
+ d.targets.append(i)
+
+ if not should_strip and t.get_debug_filename():
+ debug_file = os.path.join(self.get_target_dir(t), t.get_debug_filename())
+ i = TargetInstallData(debug_file, outdirs[0],
+ {}, False, {}, '',
+ install_mode, optional=True)
+ d.targets.append(i)
# Install secondary outputs. Only used for Vala right now.
if num_outdirs > 1:
for output, outdir in zip(t.get_outputs()[1:], outdirs[1:]):