1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-02-03 03:30:06 +00:00

Support Metal shaders in modules

This commit is contained in:
Tom Poole 2020-03-15 22:53:05 +00:00 committed by Tom Poole
parent 6a01abbc41
commit 31613e8e7d
3 changed files with 8 additions and 5 deletions

View file

@ -315,7 +315,7 @@ Array<LibraryModule::CompileUnit> LibraryModule::getAllCompileUnits (build_tools
for (auto& cu : units)
{
cu.isCompiledForObjC = true;
cu.isCompiledForNonObjC = ! cu.file.hasFileExtension ("mm;m");
cu.isCompiledForNonObjC = ! cu.file.hasFileExtension ("mm;m;metal");
if (cu.isCompiledForNonObjC)
if (cu.file.withFileExtension ("mm").existsAsFile())

View file

@ -1373,6 +1373,9 @@ public:
}
StringArray headerPaths (getHeaderSearchPaths (config));
s.set ("MTL_HEADER_SEARCH_PATHS", indentParenthesisedList (headerPaths, 1));
headerPaths.add ("\"$(inherited)\"");
s.set ("HEADER_SEARCH_PATHS", indentParenthesisedList (headerPaths, 1));
s.set ("USE_HEADERMAP", String (static_cast<bool> (config.exporter.settings.getProperty ("useHeaderMap")) ? "YES" : "NO"));

View file

@ -39,15 +39,15 @@ namespace FileHelpers
}
//==============================================================================
const char* const sourceFileExtensions = "cpp;mm;m;c;cc;cxx;swift;s;asm;r";
const char* const sourceFileExtensions = "cpp;mm;m;metal;c;cc;cxx;swift;s;asm;r";
const char* const headerFileExtensions = "h;hpp;hxx;hh;inl";
const char* const cOrCppFileExtensions = "cpp;cc;cxx;c";
const char* const cppFileExtensions = "cpp;cc;cxx";
const char* const objCFileExtensions = "mm;m";
const char* const asmFileExtensions = "s;S;asm";
const char* const sourceOrHeaderFileExtensions = "cpp;mm;m;c;cc;cxx;swift;s;S;asm;h;hpp;hxx;hh;inl";
const char* const browseableFileExtensions = "cpp;mm;m;c;cc;cxx;swift;s;S;asm;h;hpp;hxx;hh;inl;txt;md;rtf";
const char* const fileTypesToCompileByDefault = "cpp;mm;c;m;cc;cxx;swift;s;S;asm;r";
const char* const sourceOrHeaderFileExtensions = "cpp;mm;m;metal;c;cc;cxx;swift;s;S;asm;h;hpp;hxx;hh;inl";
const char* const browseableFileExtensions = "cpp;mm;m;metal;c;cc;cxx;swift;s;S;asm;h;hpp;hxx;hh;inl;txt;md;rtf";
const char* const fileTypesToCompileByDefault = "cpp;mm;m;metal;c;cc;cxx;swift;s;S;asm;r";
//==============================================================================
struct FileModificationDetector