aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild
diff options
context:
space:
mode:
authorNirbheek Chauhan <nirbheek@centricular.com>2017-04-10 04:11:48 +0530
committerJussi Pakkanen <jpakkane@gmail.com>2017-04-12 23:33:02 +0300
commitc52963cd16235ac4f6953fbbd33d257823331afa (patch)
tree0b3d3639ba3feab3bab6078893ee592d4a2a146c /mesonbuild
parenteaaaee642132d3a568136dc740f74f8aaf4388b0 (diff)
downloadmeson-c52963cd16235ac4f6953fbbd33d257823331afa.zip
meson-c52963cd16235ac4f6953fbbd33d257823331afa.tar.gz
meson-c52963cd16235ac4f6953fbbd33d257823331afa.tar.bz2
vala: Allow installation into default directories
For generated headers, vapis, and GIRs. https://github.com/mesonbuild/meson/pull/1469#issuecomment-292814000
Diffstat (limited to 'mesonbuild')
-rw-r--r--mesonbuild/backend/ninjabackend.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/mesonbuild/backend/ninjabackend.py b/mesonbuild/backend/ninjabackend.py
index 848aa59..bce46f6 100644
--- a/mesonbuild/backend/ninjabackend.py
+++ b/mesonbuild/backend/ninjabackend.py
@@ -1077,11 +1077,20 @@ int dummy;
args += ['--vapi', os.path.join('..', target.vala_vapi)]
valac_outputs.append(vapiname)
target.outputs += [target.vala_header, target.vala_vapi]
+ # Install header and vapi to default locations if user requests this
+ if len(target.install_dir) > 1 and target.install_dir[1] is True:
+ target.install_dir[1] = self.environment.get_includedir()
+ if len(target.install_dir) > 2 and target.install_dir[2] is True:
+ target.install_dir[2] = os.path.join(self.environment.get_datadir(), 'vala', 'vapi')
+ # Generate GIR if requested
if isinstance(target.vala_gir, str):
girname = os.path.join(self.get_target_dir(target), target.vala_gir)
args += ['--gir', os.path.join('..', target.vala_gir)]
valac_outputs.append(girname)
target.outputs.append(target.vala_gir)
+ # Install GIR to default location if requested by user
+ if len(target.install_dir) > 3 and target.install_dir[3] is True:
+ target.install_dir[3] = os.path.join(self.environment.get_datadir(), 'gir-1.0')
if self.get_option_for_target('werror', target):
args += valac.get_werror_args()
for d in target.get_external_deps():