diff options
author | Nirbheek Chauhan <nirbheek@centricular.com> | 2017-09-30 03:59:46 +0530 |
---|---|---|
committer | Nirbheek Chauhan <nirbheek@centricular.com> | 2017-09-30 04:11:22 +0530 |
commit | 8cc52b5d4f70619e9dfc64ecb9644a5fd24ff224 (patch) | |
tree | 032ef17e879ab4daf016e342065468320b323fd4 /mesonbuild/backend/backends.py | |
parent | 560f4b6fc74aae8ddf281e6cb1c6ae52755e143b (diff) | |
download | meson-8cc52b5d4f70619e9dfc64ecb9644a5fd24ff224.zip meson-8cc52b5d4f70619e9dfc64ecb9644a5fd24ff224.tar.gz meson-8cc52b5d4f70619e9dfc64ecb9644a5fd24ff224.tar.bz2 |
vs: Fix link_whole usage with the vs backend
/WHOLEARCHIVE must go to AdditionalOptions, not AdditionalDependencies
and we must add a project reference to trick msbuild/visual studio into
building a target that is built from only libraries linked in via
/WHOLEARCHIVE.
Diffstat (limited to 'mesonbuild/backend/backends.py')
-rw-r--r-- | mesonbuild/backend/backends.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/mesonbuild/backend/backends.py b/mesonbuild/backend/backends.py index 97959b6..9f2092b 100644 --- a/mesonbuild/backend/backends.py +++ b/mesonbuild/backend/backends.py @@ -155,6 +155,12 @@ class Backend: dirname = 'meson-out' return dirname + def get_target_dir_relative_to(self, t, o): + '''Get a target dir relative to another target's directory''' + target_dir = os.path.join(self.environment.get_build_dir(), self.get_target_dir(t)) + othert_dir = os.path.join(self.environment.get_build_dir(), self.get_target_dir(o)) + return os.path.relpath(target_dir, othert_dir) + def get_target_source_dir(self, target): dirname = os.path.join(self.build_to_src, self.get_target_dir(target)) return dirname |