diff options
author | Nirbheek Chauhan <nirbheek@centricular.com> | 2017-07-17 12:41:54 +0530 |
---|---|---|
committer | Nirbheek Chauhan <nirbheek@centricular.com> | 2017-07-17 12:41:54 +0530 |
commit | a0bd896b2fcee3f9a0fc30df6775e2e325294024 (patch) | |
tree | 4774e6d3f7663c5b4faea201a68f7275a890a736 /mesonbuild/modules/gnome.py | |
parent | 04ac7a48447b884544d160ebee824ad571408c79 (diff) | |
download | meson-a0bd896b2fcee3f9a0fc30df6775e2e325294024.zip meson-a0bd896b2fcee3f9a0fc30df6775e2e325294024.tar.gz meson-a0bd896b2fcee3f9a0fc30df6775e2e325294024.tar.bz2 |
gnome module: Add -lfoo after -Lbar LDFLAGS
Otherwise they won't take effect
Diffstat (limited to 'mesonbuild/modules/gnome.py')
-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 a2274f2..3b4d1ce 100644 --- a/mesonbuild/modules/gnome.py +++ b/mesonbuild/modules/gnome.py @@ -291,11 +291,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) @@ -312,6 +309,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, |