]> git.tdb.fi Git - builder.git/blobdiff - source/lib/sourcepackage.h
Install headers of non-installed components in a staging directory
[builder.git] / source / lib / sourcepackage.h
index d458c9094208c9c86ff4755bb34d9bb47aa6d3b7..c311c210e86431f06fffd6a2932ffa49604deaea 100644 (file)
@@ -11,6 +11,7 @@
 #include "conditionalloader.h"
 #include "config.h"
 #include "feature.h"
+#include "libbuilder_api.h"
 #include "package.h"
 #include "toolchain.h"
 
@@ -21,7 +22,7 @@ class SourceArchiveComponent;
 /**
 A package that can be built by Builder.
 */
-class SourcePackage: public Package
+class LIBBUILDER_API SourcePackage: public Package
 {
 public:
        class Loader: public Msp::DataFile::DerivedObjectLoader<SourcePackage, Package::Loader>, public FeatureConditional
@@ -42,6 +43,7 @@ public:
        private:
                void finish() override;
 
+               void exported();
                void feature(const std::string &, const std::string &);
                template<typename C, typename... Args>
                void component(Args..., const std::string &);
@@ -56,6 +58,15 @@ public:
        using ComponentRegistry = Msp::TypeRegistry<Loader::AddComponent, Loader &>;
 
 private:
+       class ExportLoader: public Msp::DataFile::ObjectLoader<SourcePackage>
+       {
+       public:
+               ExportLoader(SourcePackage &);
+
+       private:
+               void build_info();
+       };
+
        std::string version;
        std::string interface_version;
        std::string description;
@@ -83,6 +94,7 @@ public:
        const Msp::FS::Path &get_source_directory() const { return source_dir; }
        Msp::FS::Path get_temp_directory() const;
        Msp::FS::Path get_output_directory() const;
+       Msp::FS::Path get_staging_directory() const;
 
        const Toolchain &get_toolchain() const { return local_tools; }
        const Component &get_component(const std::string &) const;