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:
parent
8dfb1c589a
commit
f2c50b8bd8
1 changed files with 2 additions and 25 deletions
|
|
@ -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(), " ", "");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue