]> git.tdb.fi Git - builder.git/blobdiff - source/sourcepackage.cpp
Get rid of the install flags, which weren't entirely correct anyway
[builder.git] / source / sourcepackage.cpp
index 456acfd6af1e0f37505a6973c3ce20e8bd0f3764..02e9152a7b3ef52abcf5042bcf41d56516b7ac0a 100644 (file)
@@ -44,21 +44,6 @@ FS::Path SourcePackage::get_out_dir() const
                return source/arch.get_name()/config.get_option("outdir").value;
 }
 
-unsigned SourcePackage::get_install_flags()
-{
-       unsigned flags = 0;
-       for(ComponentList::iterator i=components.begin(); i!=components.end(); ++i)
-               if(i->get_install())
-               {
-                       if(i->get_type()==Component::PROGRAM)
-                               flags |= BIN;
-                       else if(i->get_type()==Component::LIBRARY || i->get_type()==Component::MODULE)
-                               flags |= LIB|INCLUDE;
-               }
-
-       return flags;
-}
-
 LibMode SourcePackage::get_library_mode() const
 {
        const string &mode = config.get_option("staticlibs").value;
@@ -180,15 +165,18 @@ void SourcePackage::create_build_info()
        const StringList &warnings = builder.get_warnings();
        build_info.warnings.insert(build_info.warnings.begin(), warnings.begin(), warnings.end());
 
-       unsigned flags = get_install_flags();
-
        build_info.incpath.push_back((builder.get_prefix()/"include").str());
        build_info.libpath.push_back((builder.get_prefix()/"lib").str());
 
-       if(flags&INCLUDE)
+       bool export_paths = false;
+       for(ComponentList::const_iterator i=components.begin(); (!export_paths && i!=components.end()); ++i)
+               export_paths = (i->get_type()==Component::LIBRARY);
+
+       if(export_paths)
+       {
                export_binfo.incpath.push_back((builder.get_prefix()/"include").str());
-       if(flags&LIB)
                export_binfo.libpath.push_back((builder.get_prefix()/"lib").str());
+       }
 
        string optimize = config.get_option("optimize").value;
        if(!optimize.empty() && optimize!="0")