diff options
author | Nirbheek Chauhan <nirbheek@centricular.com> | 2017-07-17 12:41:54 +0530 |
---|---|---|
committer | Nirbheek Chauhan <nirbheek@centricular.com> | 2017-07-17 21:42:53 +0530 |
commit | 19f39ad05952099ecb915399231aa88f9acd3b20 (patch) | |
tree | 447149bf681b6c4c84e15e9cc1bbca934d0fdd91 | |
parent | b9caaf94bc918dc8831889e1c6de5bbc9ad2a481 (diff) | |
download | meson-19f39ad05952099ecb915399231aa88f9acd3b20.zip meson-19f39ad05952099ecb915399231aa88f9acd3b20.tar.gz meson-19f39ad05952099ecb915399231aa88f9acd3b20.tar.bz2 |
gnome module: Add -lfoo after -Lbar LDFLAGS
Otherwise they won't take effect
-rw-r--r-- | mesonbuild/modules/gnome.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/mesonbuild/modules/gnome.py b/mesonbuild/modules/gnome.py index 7d539aa..6e633a7 100644 --- a/mesonbuild/modules/gnome.py +++ b/mesonbuild/modules/gnome.py @@ -288,11 +288,8 @@ class GnomeModule(ExtensionModule): def _get_link_args(self, state, lib, depends=None, include_rpath=False, use_gir_args=False): + link_command = [] # Construct link args - if gir_has_extra_lib_arg() and use_gir_args: - link_command = ['--extra-library=' + lib.name] - else: - link_command = ['-l' + lib.name] if isinstance(lib, build.SharedLibrary): libdir = os.path.join(state.environment.get_build_dir(), state.backend.get_target_dir(lib)) link_command.append('-L' + libdir) @@ -309,6 +306,10 @@ class GnomeModule(ExtensionModule): link_command.append('-Wl,-rpath,' + libdir) if depends: depends.append(lib) + if gir_has_extra_lib_arg() and use_gir_args: + link_command.append('--extra-library=' + lib.name) + else: + link_command.append('-l' + lib.name) return link_command def _get_dependencies_flags(self, deps, state, depends=None, include_rpath=False, |