buildable(true),
source(s),
conf_done(false),
+ use_pkgconfig(true),
need_path(false)
{ }
path=builder.get_cwd()/p;
}
+/**
+Checks which kinds of things the components of this package install.
+
+@return A bitmask of installed things
+*/
+unsigned Package::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;
+ }
+ if(!i->get_install_headers().empty())
+ flags|=INCLUDE;
+ }
+
+ return flags;
+}
+
/**
Tries to resolve all references to dependency packages.
*/
vector<string> info=split(run_command(argv));
bool need_path=false;
+ bool use_pkgconfig=true;
if(info.empty())
{
+ use_pkgconfig=false;
+
//XXX Put these in an external file
if(name=="opengl")
info.push_back("-lGL");
Package *pkg=new Package(b, name, info);
pkg->need_path=need_path;
+ pkg->use_pkgconfig=use_pkgconfig;
return pkg;
}
export_binfo.unique();
}
-/**
-Checks which kinds of things the components of this package install.
-
-@return A bitmask of installed things
-*/
-unsigned Package::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;
- }
- if(!i->get_install_headers().empty())
- flags|=INCLUDE;
- }
-
- return flags;
-}
-
Package::Loader::Loader(Package &p):
pkg(p)
{