]> git.tdb.fi Git - builder.git/blobdiff - source/buildinfo.h
Account for install directories when forming displaced dependency paths
[builder.git] / source / buildinfo.h
index 1bba8195bc536014270ba8eff7664d31e63e7069..fa8ae62d39606527509d7c9a8b8dd18d77db68e7 100644 (file)
@@ -21,6 +21,13 @@ public:
                FORCE_DYNAMIC  //< Only accept dynamic libraries
        };
 
+       enum RuntimePathMode
+       {
+               NO_RPATH,  //< Do not record rpath in binaries
+               RELATIVE,  //< Record relative rpath in binaries
+               ABSOLUTE   //< Record absolute rpath in binaries
+       };
+
        class Loader: public Msp::DataFile::ObjectLoader<BuildInfo>
        {
        public:
@@ -64,10 +71,11 @@ public:
        public:
                Tracked(): value(T()), set(false) { }
                Tracked(T v): value(v), set(false) { }
+               Tracked(const Tracked &t): value(t.value), set(t.set) { }
                Tracked &operator=(const Tracked &v) { if(v.set) { value = v.value; set = true; } return *this; }
 
-               Tracked &operator=(v) { value = v; set = true; return *this; }
-               operator T() const { return value; }
+               Tracked &operator=(const T &v) { value = v; set = true; return *this; }
+               operator const T &() const { return value; }
        };
 
        typedef std::map<std::string, std::string> DefineMap;
@@ -83,6 +91,7 @@ public:
        PathList libpath;
        WordList libs;
        Tracked<LibraryMode> libmode;
+       Tracked<RuntimePathMode> rpath_mode;
        LibModeMap libmodes;
        WordList keep_symbols;
        StandardMap standards;