From bbf670d03ee587b0794f77a39db801bad6459ca5 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 18 Nov 2024 11:38:44 +0200 Subject: Only install runtime part of static library prerequisites of share libraries (GH issue #448) --- libbuild2/bin/rule.hxx | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'libbuild2/bin/rule.hxx') diff --git a/libbuild2/bin/rule.hxx b/libbuild2/bin/rule.hxx index 9dd1d14..74f4301 100644 --- a/libbuild2/bin/rule.hxx +++ b/libbuild2/bin/rule.hxx @@ -10,6 +10,7 @@ #include #include +#include #include @@ -78,6 +79,26 @@ namespace build2 static target_state perform (action, const target&); }; + + // Install rule for lib{} group. + // + // The only difference compared to the standard install::group_rule is + // that it ignores the lib{} prerequisites, instead expecting the correct + // things to be installed via the liba{}/libs{} members. This is important + // due to the presence of match options (see lib{} target for details). + // + class LIBBUILD2_BIN_SYMEXPORT install_lib_rule: public install::group_rule + { + public: + install_lib_rule () {} + + virtual pair + filter (const scope*, + action, const target&, const prerequisite&, + match_extra&) const override; + + using install::group_rule::filter; // "Unhide" to make Clang happy. + }; } } -- cgit v1.1