diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2017-07-31 18:42:47 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2017-07-31 18:44:07 +0200 |
commit | a84ff43b183181e0a12c6d5e31c1f366d39ce2fe (patch) | |
tree | 3dce54b64fd8e9917ed034a3e2c9e20f057eece4 /build2/pkgconfig/target.cxx | |
parent | 89f5bc3b423a1269a60ccca05174226c8de40357 (diff) |
Experimental (and probably broken) pkg-config generation support
Diffstat (limited to 'build2/pkgconfig/target.cxx')
-rw-r--r-- | build2/pkgconfig/target.cxx | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/build2/pkgconfig/target.cxx b/build2/pkgconfig/target.cxx new file mode 100644 index 0000000..7752f58 --- /dev/null +++ b/build2/pkgconfig/target.cxx @@ -0,0 +1,54 @@ +// file : build2/pkgconfig/target.cxx -*- C++ -*- +// copyright : Copyright (c) 2014-2017 Code Synthesis Ltd +// license : MIT; see accompanying LICENSE file + +#include <build2/pkgconfig/target.hxx> + +using namespace std; +using namespace butl; + +namespace build2 +{ + namespace pkgconfig + { + const target_type pc::static_type + { + "pc", + &file::static_type, + nullptr, + nullptr, + nullptr, + nullptr, + &target_search, + false + }; + + extern const char pca_ext[] = "static.pc"; // VC14 rejects constexpr. + + const target_type pca::static_type + { + "pca", + &pc::static_type, + &file_factory<pca, pca_ext>, + &target_extension_fix<pca_ext>, + &target_pattern_fix<pca_ext>, + &target_print_0_ext_verb, // Fixed extension, no use printing. + &file_search, + false + }; + + extern const char pcs_ext[] = "shared.pc"; // VC14 rejects constexpr. + + const target_type pcs::static_type + { + "pcs", + &pc::static_type, + &file_factory<pcs, pcs_ext>, + &target_extension_fix<pcs_ext>, + &target_pattern_fix<pcs_ext>, + &target_print_0_ext_verb, // Fixed extension, no use printing. + &file_search, + false + }; + } +} |