mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-16 00:34:19 +00:00
Projucer: Fixed a bug in the live-build engine where it would not pick up the global project pre-processor defines
This commit is contained in:
parent
1e9a5a18ec
commit
1b99d653aa
1 changed files with 23 additions and 4 deletions
|
|
@ -378,17 +378,36 @@ private:
|
|||
|
||||
static String getGlobalDefs (Project& proj)
|
||||
{
|
||||
String defs (ProjectProperties::getExtraPreprocessorDefsValue (proj).get().toString());
|
||||
StringArray defs;
|
||||
|
||||
defs.add (ProjectProperties::getExtraPreprocessorDefsValue (proj).get().toString());
|
||||
|
||||
{
|
||||
auto projectDefines = proj.getPreprocessorDefs();
|
||||
StringArray result;
|
||||
|
||||
for (int i = 0; i < projectDefines.size(); ++i)
|
||||
{
|
||||
auto def = projectDefines.getAllKeys()[i];
|
||||
auto value = projectDefines.getAllValues()[i];
|
||||
|
||||
if (value.isNotEmpty())
|
||||
def << "=" << value;
|
||||
|
||||
defs.add (def);
|
||||
}
|
||||
}
|
||||
|
||||
for (Project::ExporterIterator exporter (proj); exporter.next();)
|
||||
if (exporter->canLaunchProject())
|
||||
defs << " " << exporter->getExporterIdentifierMacro() << "=1";
|
||||
defs.add (exporter->getExporterIdentifierMacro() + "=1");
|
||||
|
||||
// Use the JUCE implementation of std::function until the live build
|
||||
// engine can compile the one from the standard library
|
||||
defs << " _LIBCPP_FUNCTIONAL=1";
|
||||
defs.add (" _LIBCPP_FUNCTIONAL=1");
|
||||
defs.removeEmptyStrings();
|
||||
|
||||
return defs;
|
||||
return defs.joinIntoString (" ");
|
||||
}
|
||||
|
||||
static void scanProjectItem (const Project::Item& projectItem, Array<File>& compileUnits, Array<File>& userFiles)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue