aboutsummaryrefslogtreecommitdiff
path: root/build2/pkgconfig
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2017-01-06 17:28:45 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2017-01-06 17:28:45 +0200
commit9f5c4c1ae3bff517eefb39130287016514fb31c7 (patch)
treece230ddff1c623a4b329c3ae74fe6e77243be068 /build2/pkgconfig
parent6f1d989609ac5d13e204fab3bd85f6364e12edd5 (diff)
Store platform targets as typed target_triplet
Diffstat (limited to 'build2/pkgconfig')
-rw-r--r--build2/pkgconfig/init.cxx8
1 files changed, 5 insertions, 3 deletions
diff --git a/build2/pkgconfig/init.cxx b/build2/pkgconfig/init.cxx
index ece0caf..7149eb6 100644
--- a/build2/pkgconfig/init.cxx
+++ b/build2/pkgconfig/init.cxx
@@ -42,9 +42,11 @@ namespace build2
auto& vp (var_pool);
const variable& c_x (vp.insert<path> ("config.pkgconfig", true));
- const variable& c_x_tgt (vp.insert<string> ("config.pkgconfig.target"));
const variable& x_path (vp.insert<process_path> ("pkgconfig.path"));
+ const variable& c_x_tgt (
+ vp.insert<target_triplet> ("config.pkgconfig.target"));
+
// Configure.
//
@@ -80,9 +82,9 @@ namespace build2
//
if (pp.empty ())
{
- if (const string* t = cast_null<string> (hints[c_x_tgt]))
+ if (const auto* t = cast_null<target_triplet> (hints[c_x_tgt]))
{
- d = *t;
+ d = t->string ();
d += "-pkg-config";
l5 ([&]{trace << "trying " << d;});