]> git.tdb.fi Git - builder.git/blobdiff - source/lib/installedfile.cpp
Install headers of non-installed components in a staging directory
[builder.git] / source / lib / installedfile.cpp
index ef7a7709e6335ba2f2682c5af6b71ed7e4524101..bf542b0082feafe7ad427c04180511f020e0964d 100644 (file)
@@ -26,18 +26,18 @@ FS::Path InstalledFile::generate_target_path(const FS::Path &global_prefix, cons
                if(!tgt.get_package())
                        throw invalid_argument("No private install location for "+tgt.get_name());
 
-               prefix = tgt.get_package()->get_temp_directory();
+               prefix = tgt.get_package()->get_staging_directory();
                mid = loc.substr(2);
        }
        else
        {
                prefix = global_prefix;
+               mid = loc;
+       }
 
-               if(!loc.empty())
-                       mid = loc;
-               else if(const Component *comp = tgt.get_component())
+       if(mid.empty())
+               if(const Component *comp = tgt.get_component())
                        mid = comp->get_install_map().get_install_location(tgt);
-       }
 
        if(mid.empty())
                mid = tgt.get_install_location();