Compile each .metal file into a separate .metallib

浪子不回头ぞ 提交于 2019-11-30 17:46:23

问题


I would like to override the default Xcode Metal compiler behaviour of compiling all project .metal files into a single default.metallib and instead compile each .metal file into a separate .metallib file.

However I cannot see how to approach this; can anyone provide a lead?

Xcode version: 10.1


回答1:


I achieved this in two steps:

1) Add a custom build rule for .metal files that compiles them individually into .metallibs:

2) Add a custom build step for copying those .metallibs into your target:



来源:https://stackoverflow.com/questions/54914564/compile-each-metal-file-into-a-separate-metallib

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!