From 4d1c02b736f4c1e827b11085cdc83ce4b46c03d1 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Sun, 26 Jun 2016 16:06:54 +0200 Subject: Add notion of ad hoc group, use to handle DLL/import library --- build2/install/utility | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) (limited to 'build2/install/utility') diff --git a/build2/install/utility b/build2/install/utility index 3d3b1a1..1abed27 100644 --- a/build2/install/utility +++ b/build2/install/utility @@ -16,23 +16,35 @@ namespace build2 { // Set install path, mode for a target type. // - template inline void - path (scope& s, dir_path d) + install_path (const target_type& tt, scope& s, dir_path d) { - auto r (s.target_vars[T::static_type]["*"].assign ("install")); + auto r (s.target_vars[tt]["*"].assign ("install")); if (r.second) // Already set by the user? r.first.get () = move (d); } template inline void - mode (scope& s, string m) + install_path (scope& s, dir_path d) + { + return install_path (T::static_type, s, d); + } + + inline void + install_mode (const target_type& tt, scope& s, string m) { - auto r (s.target_vars[T::static_type]["*"].assign ("install.mode")); + auto r (s.target_vars[tt]["*"].assign ("install.mode")); if (r.second) // Already set by the user? r.first.get () = move (m); } + + template + inline void + install_mode (scope& s, string m) + { + return install_mode (T::static_type, s, m); + } } } -- cgit v1.1