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/ninjabackend.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/ninjabackend.py')
-rw-r--r-- | mesonbuild/backend/ninjabackend.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/mesonbuild/backend/ninjabackend.py b/mesonbuild/backend/ninjabackend.py index 7f974ee..f10d516 100644 --- a/mesonbuild/backend/ninjabackend.py +++ b/mesonbuild/backend/ninjabackend.py @@ -693,7 +693,8 @@ int dummy; # 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) and t.get_import_filename(): + if (isinstance(t, build.SharedLibrary) or + isinstance(t, 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 @@ -2256,6 +2257,9 @@ rule FORTRAN_DEP_HACK # If gui_app, and that's significant on this platform if target.gui_app and hasattr(linker, 'get_gui_app_args'): commands += linker.get_gui_app_args() + # If implib, and that's significant on this platform (i.e. Windows using either GCC or Visual Studio) + if target.import_filename: + commands += linker.gen_import_library_args(os.path.join(target.subdir, target.import_filename)) elif isinstance(target, build.SharedLibrary): if isinstance(target, build.SharedModule): commands += linker.get_std_shared_module_link_args() |