1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

Introjucer: fix for android not using external libraries setting.

This commit is contained in:
jules 2013-03-06 20:30:13 +00:00
parent 28fa04a5f4
commit 22b98217d8
5 changed files with 21 additions and 26 deletions

View file

@ -439,29 +439,17 @@ private:
out << " LOCAL_CPPFLAGS += " << createCPPFlags (androidConfig)
<< (" " + replacePreprocessorTokens (androidConfig, getExtraCompilerFlagsString()).trim()).trimEnd()
<< newLine
<< getDynamicLibs (androidConfig);
<< getLDLIBS (androidConfig);
break;
}
}
}
String getDynamicLibs (const AndroidBuildConfiguration& config) const
String getLDLIBS (const AndroidBuildConfiguration& config) const
{
String flags (" LOCAL_LDLIBS :=");
flags << config.getGCCLibraryPathFlags();
{
StringArray libs;
libs.add ("log");
libs.add ("GLESv2");
for (int i = 0; i < libs.size(); ++i)
flags << " -l" << libs[i];
}
return flags + newLine;
return " LOCAL_LDLIBS :=" + config.getGCCLibraryPathFlags()
+ " -llog -lGLESv2 " + getExternalLibraryFlags (config) + newLine;
}
String createIncludePathFlags (const BuildConfiguration& config) const

View file

@ -618,13 +618,7 @@ private:
getLinkerFlagsForStaticLibrary (extraLibs.getReference(i), flags, librarySearchPaths);
flags.add (replacePreprocessorTokens (config, getExtraLinkerFlagsString()));
StringArray libraries;
libraries.addTokens (getExternalLibrariesString(), ";", "\"'");
libraries.removeEmptyStrings (true);
if (libraries.size() != 0)
flags.add (replacePreprocessorTokens (config, "-l" + libraries.joinIntoString (" -l")).trim());
flags.add (getExternalLibraryFlags (config));
flags.removeEmptyStrings (true);
}

View file

@ -577,3 +577,15 @@ String ProjectExporter::BuildConfiguration::getGCCLibraryPathFlags() const
return s;
}
String ProjectExporter::getExternalLibraryFlags (const BuildConfiguration& config) const
{
StringArray libraries;
libraries.addTokens (getExternalLibrariesString(), ";", "\"'");
libraries.removeEmptyStrings (true);
if (libraries.size() != 0)
return replacePreprocessorTokens (config, "-l" + libraries.joinIntoString (" -l")).trim();
return String::empty;
}

View file

@ -220,6 +220,8 @@ public:
bool hasConfigurationNamed (const String& name) const;
String getUniqueConfigName (String name) const;
String getExternalLibraryFlags (const BuildConfiguration& config) const;
//==============================================================================
struct ConfigIterator
{

View file

@ -779,9 +779,8 @@ class ValueTreePropertyValueSource : public Value::ValueSource,
private ValueTree::Listener
{
public:
ValueTreePropertyValueSource (const ValueTree& tree_, const Identifier& property_,
UndoManager* const undoManager_)
: tree (tree_), property (property_), undoManager (undoManager_)
ValueTreePropertyValueSource (const ValueTree& vt, const Identifier& prop, UndoManager* um)
: tree (vt), property (prop), undoManager (um)
{
tree.addListener (this);
}