]> git.tdb.fi Git - builder.git/blobdiff - source/packagemanager.h
Move main package tracking to PackageManager
[builder.git] / source / packagemanager.h
index 9fb373ec48152b70a16a5e56b93604c08176b38c..48c3c16fd4fcbdb486368fa2dfed5147af7f7b8b 100644 (file)
@@ -28,6 +28,7 @@ private:
        SearchPath binpkg_files;
        bool no_externals;
        PackageMap packages;
+       Package *main_pkg;
        std::set<std::string> not_found;
        bool env_set;
 
@@ -50,6 +51,10 @@ public:
        /** Returns a package from the cache. */
        Package *get_package(const std::string &);
 
+       /** Returns the package that was added first.  This should be considered
+       the primary build target. */
+       Package &get_main_package() const;
+
        const PackageMap &get_packages() const { return packages; }
 
        /** Locates a package and loads it if necessary. */