diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2017-07-21 20:06:46 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-07-21 20:06:46 +0300 |
commit | 979efce04a26287639615d32182dff97582bf6ee (patch) | |
tree | 1cadab7c687a7ed85858812116a5b04bc5a373db /mesonbuild/backend/vs2010backend.py | |
parent | 381e8313ed191ae8e440a9ba3805d5322c769ea7 (diff) | |
parent | 887e4d131857bf44eea1566adae9b79c610e3e86 (diff) | |
download | meson-979efce04a26287639615d32182dff97582bf6ee.zip meson-979efce04a26287639615d32182dff97582bf6ee.tar.gz meson-979efce04a26287639615d32182dff97582bf6ee.tar.bz2 |
Merge pull request #1955 from jon-turney/exe-implib
Support implibs for executables on Windows
Diffstat (limited to 'mesonbuild/backend/vs2010backend.py')
-rw-r--r-- | mesonbuild/backend/vs2010backend.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/mesonbuild/backend/vs2010backend.py b/mesonbuild/backend/vs2010backend.py index 57b0437..4a92155 100644 --- a/mesonbuild/backend/vs2010backend.py +++ b/mesonbuild/backend/vs2010backend.py @@ -951,10 +951,12 @@ class Vs2010Backend(backends.Backend): ofile.text = '$(OutDir)%s' % target.get_filename() subsys = ET.SubElement(link, 'SubSystem') subsys.text = subsystem - if isinstance(target, build.SharedLibrary): + if (isinstance(target, build.SharedLibrary) or + isinstance(target, build.Executable)) and target.get_import_filename(): # DLLs built with MSVC always have an import library except when # they're data-only DLLs, but we don't support those yet. ET.SubElement(link, 'ImportLibrary').text = target.get_import_filename() + if isinstance(target, build.SharedLibrary): # Add module definitions file, if provided if target.vs_module_defs: relpath = os.path.join(down, target.vs_module_defs.rel_to_builddir(self.build_to_src)) |