aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild
diff options
context:
space:
mode:
Diffstat (limited to 'mesonbuild')
-rw-r--r--mesonbuild/modules/gnome.py9
-rw-r--r--mesonbuild/scripts/gtkdochelper.py8
2 files changed, 10 insertions, 7 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,
diff --git a/mesonbuild/scripts/gtkdochelper.py b/mesonbuild/scripts/gtkdochelper.py
index a2cbf5a..45ed96b 100644
--- a/mesonbuild/scripts/gtkdochelper.py
+++ b/mesonbuild/scripts/gtkdochelper.py
@@ -218,12 +218,14 @@ def run(args):
options.mode)
if 'MESON_INSTALL_PREFIX' in os.environ:
- install_dir = options.install_dir if options.install_dir else options.modulename
destdir = os.environ.get('DESTDIR', '')
- installdir = destdir_join(destdir, os.environ['MESON_INSTALL_PREFIX'])
+ install_prefix = destdir_join(destdir, os.environ['MESON_INSTALL_PREFIX'])
+ install_dir = options.install_dir if options.install_dir else options.modulename
+ if os.path.isabs(install_dir):
+ install_dir = destdir_join(destdir, install_dir)
install_gtkdoc(options.builddir,
options.subdir,
- installdir,
+ install_prefix,
'share/gtk-doc/html',
install_dir)
return 0