]> git.tdb.fi Git - builder.git/blobdiff - source/sourcepackage.cpp
Allow features to be exported
[builder.git] / source / sourcepackage.cpp
index 9e1b68dd43d60b4b81d61f2c65051412d7286fa6..bb9999476d0041f3529aacc44b7a3a60b3d8b960 100644 (file)
@@ -107,10 +107,17 @@ void SourcePackage::do_prepare()
        {
                string ident = "WITH_"+toupper(i->name);
                string value = config.get_option("with_"+i->name).value;
-               if(!i->choices.empty())
-                       build_info.defines[ident] = value;
-               else if(lexical_cast<bool>(value))
-                       build_info.defines[ident] = "1";
+
+               if(i->choices.empty())
+               {
+                       if(!lexical_cast<bool>(value))
+                               continue;
+                       value = "1";
+               }
+
+               build_info.defines[ident] = value;
+               if(i->exported)
+                       export_binfo.defines[ident] = value;
        }
 
        for(ComponentList::iterator i=components.begin(); i!=components.end(); ++i)