Browse Source

Introjucer: fix for android not using external libraries setting.

tags/2021-05-28
jules 13 years ago
parent
commit
22b98217d8
5 changed files with 21 additions and 26 deletions
  1. +4
    -16
      extras/Introjucer/Source/Project Saving/jucer_ProjectExport_Android.h
  2. +1
    -7
      extras/Introjucer/Source/Project Saving/jucer_ProjectExport_XCode.h
  3. +12
    -0
      extras/Introjucer/Source/Project Saving/jucer_ProjectExporter.cpp
  4. +2
    -0
      extras/Introjucer/Source/Project Saving/jucer_ProjectExporter.h
  5. +2
    -3
      modules/juce_data_structures/values/juce_ValueTree.cpp

+ 4
- 16
extras/Introjucer/Source/Project Saving/jucer_ProjectExport_Android.h View File

@@ -439,29 +439,17 @@ private:
out << " LOCAL_CPPFLAGS += " << createCPPFlags (androidConfig) out << " LOCAL_CPPFLAGS += " << createCPPFlags (androidConfig)
<< (" " + replacePreprocessorTokens (androidConfig, getExtraCompilerFlagsString()).trim()).trimEnd() << (" " + replacePreprocessorTokens (androidConfig, getExtraCompilerFlagsString()).trim()).trimEnd()
<< newLine << newLine
<< getDynamicLibs (androidConfig);
<< getLDLIBS (androidConfig);
break; 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 String createIncludePathFlags (const BuildConfiguration& config) const


+ 1
- 7
extras/Introjucer/Source/Project Saving/jucer_ProjectExport_XCode.h View File

@@ -618,13 +618,7 @@ private:
getLinkerFlagsForStaticLibrary (extraLibs.getReference(i), flags, librarySearchPaths); getLinkerFlagsForStaticLibrary (extraLibs.getReference(i), flags, librarySearchPaths);
flags.add (replacePreprocessorTokens (config, getExtraLinkerFlagsString())); 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); flags.removeEmptyStrings (true);
} }


+ 12
- 0
extras/Introjucer/Source/Project Saving/jucer_ProjectExporter.cpp View File

@@ -577,3 +577,15 @@ String ProjectExporter::BuildConfiguration::getGCCLibraryPathFlags() const
return s; 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;
}

+ 2
- 0
extras/Introjucer/Source/Project Saving/jucer_ProjectExporter.h View File

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


+ 2
- 3
modules/juce_data_structures/values/juce_ValueTree.cpp View File

@@ -779,9 +779,8 @@ class ValueTreePropertyValueSource : public Value::ValueSource,
private ValueTree::Listener private ValueTree::Listener
{ {
public: 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); tree.addListener (this);
} }


Loading…
Cancel
Save