aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/cc/target.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2020-03-20 12:56:12 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2020-03-20 12:56:12 +0200
commita18661636cd169b0912cc58c623fdd69e3250229 (patch)
tree785943e5fba6808c69c58cbeadaf66d6257c36ca /libbuild2/cc/target.cxx
parent3b361af7681125e7db98a9e4e69c80d469cae256 (diff)
Generate common .pc file in addition to static/staged when installing lib{}
The common .pc file is produced by ignoring any static/shared-specific poptions and splitting loptions/libs into Libs/Libs.private. It is "best effort", in a sense that it's not guaranteed to be sufficient in all cases, but it will probably cover the majority of cases, even on Windows, thanks to automatic dllimport'ing of functions.
Diffstat (limited to 'libbuild2/cc/target.cxx')
-rw-r--r--libbuild2/cc/target.cxx14
1 files changed, 8 insertions, 6 deletions
diff --git a/libbuild2/cc/target.cxx b/libbuild2/cc/target.cxx
index a962575..b17e1ef 100644
--- a/libbuild2/cc/target.cxx
+++ b/libbuild2/cc/target.cxx
@@ -54,16 +54,18 @@ namespace build2
false
};
+ extern const char pc_ext[] = "pc"; // VC14 rejects constexpr.
+
const target_type pc::static_type
{
"pc",
&file::static_type,
- nullptr,
- nullptr,
- nullptr,
- nullptr,
- nullptr,
- &target_search,
+ &target_factory<pc>,
+ &target_extension_fix<pc_ext>,
+ nullptr, /* default_extension */
+ &target_pattern_fix<pc_ext>,
+ &target_print_0_ext_verb, // Fixed extension, no use printing.
+ &file_search,
false
};