Allow installing dir from build dir

pull/7490/head
Xavier Claessens 5 years ago committed by Xavier Claessens
parent 7fbdf38ce3
commit 19696c3dcd
  1. 6
      mesonbuild/backend/backends.py
  2. 4
      mesonbuild/interpreter.py

@ -1335,7 +1335,11 @@ class Backend:
def generate_subdir_install(self, d):
for sd in self.build.get_install_subdirs():
src_dir = os.path.join(self.environment.get_source_dir(),
if sd.from_source_dir:
from_dir = self.environment.get_source_dir()
else:
from_dir = self.environment.get_build_dir()
src_dir = os.path.join(from_dir,
sd.source_subdir,
sd.installable_subdir).rstrip('/')
dst_dir = os.path.join(self.environment.get_prefix(),

@ -741,7 +741,8 @@ class DataHolder(InterpreterObject, ObjectHolder):
return self.held_object.install_dir
class InstallDir(InterpreterObject):
def __init__(self, src_subdir, inst_subdir, install_dir, install_mode, exclude, strip_directory):
def __init__(self, src_subdir, inst_subdir, install_dir, install_mode,
exclude, strip_directory, from_source_dir=True):
InterpreterObject.__init__(self)
self.source_subdir = src_subdir
self.installable_subdir = inst_subdir
@ -749,6 +750,7 @@ class InstallDir(InterpreterObject):
self.install_mode = install_mode
self.exclude = exclude
self.strip_directory = strip_directory
self.from_source_dir = from_source_dir
class Man(InterpreterObject):

Loading…
Cancel
Save