aboutsummaryrefslogtreecommitdiff
path: root/build2/install/utility
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2016-06-26 16:06:54 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2016-06-26 16:06:54 +0200
commit4d1c02b736f4c1e827b11085cdc83ce4b46c03d1 (patch)
tree8d6a8318c23b1e9085d73c36843c90e875a52095 /build2/install/utility
parent70d00b9f7f3266c1962f6d5a6fc8de1866c67949 (diff)
Add notion of ad hoc group, use to handle DLL/import library
Diffstat (limited to 'build2/install/utility')
-rw-r--r--build2/install/utility22
1 files changed, 17 insertions, 5 deletions
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 <typename T>
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 <typename T>
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 <typename T>
+ inline void
+ install_mode (scope& s, string m)
+ {
+ return install_mode (T::static_type, s, m);
+ }
}
}