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

Android studio exporter: fixed include paths to work with new module format.

This commit is contained in:
Timur Doumler 2016-04-19 18:49:00 +01:00
parent 8dfb1c589a
commit f2c50b8bd8

View file

@ -620,36 +620,13 @@ private:
const char* basicJucePaths[] = { "${project.rootDir}/app", "${ext.juceRootDir}", "${ext.juceModuleDir}", nullptr };
StringArray includePaths (basicJucePaths);
auto cppFiles = getAllIncludedCppFiles();
for (const auto& cppFile : cppFiles)
includePaths.addIfNotAlreadyThere (getIncludePathForFile (cppFile));
includePaths.add (sanitisePath (project.getProjectFolder().getFullPathName() + "/Source/"));
includePaths.add (sanitisePath (project.getProjectFolder().getFullPathName() + "/../../JUCE/modules/"));
for (const auto& path : includePaths)
ndk->add<GradleHeaderIncludePath> (path);
}
Array<RelativePath> getAllIncludedCppFiles() const
{
Array<RelativePath> cppFiles;
const auto& groups = getAllGroups();
for (int i = 0; i < groups.size(); ++i)
findAllProjectItemsWithPredicate (groups.getReference (i), cppFiles, ShouldBeAddedToProjectPredicate());
return cppFiles;
}
String getIncludePathForFile (const RelativePath& file) const
{
return sanitisePath (project.getProjectFolder().getFullPathName() + "/"
+ file.rebased (getTargetFolder(),
project.getProjectFolder(),
RelativePath::projectFolder)
.toUnixStyle()
.upToLastOccurrenceOf ("/", false, false));
}
void addNdkLinkerFlags (GradleObject* ndk) const
{
const auto linkerFlags = StringArray::fromTokens (getExtraLinkerFlagsString(), " ", "");