Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to fix 'MTIShaderLib.h' file not found in package? #366

Open
GitHubyangjunyi opened this issue Jul 4, 2023 · 5 comments
Open

How to fix 'MTIShaderLib.h' file not found in package? #366

GitHubyangjunyi opened this issue Jul 4, 2023 · 5 comments

Comments

@GitHubyangjunyi
Copy link

屏幕快照 2023-07-04 的 19 48 07 下午

@GitHubyangjunyi
Copy link
Author

屏幕快照 2023-07-04 的 19 51 28 下午

@ChaseStas
Copy link

@GitHubyangjunyi have you found solution?

@bojanstef
Copy link

Have you tried adding the path of MTIShaderLib.h file to the Metal Compiler - Header Search Paths (MTL_HEADER_SEARCH_PATHS) setting?

CocoaPods

  • set the MTL_HEADER_SEARCH_PATHS to ${PODS_CONFIGURATION_BUILD_DIR}/MetalPetal/MetalPetal.framework/Headers or ${PODS_ROOT}/MetalPetal/Frameworks/MetalPetal/Shaders.

Swift Package Manager

  • set the MTL_HEADER_SEARCH_PATHS to $(HEADER_SEARCH_PATHS)

https://github.com/MetalPetal/MetalPetal#build-custom-filter
Screenshot 2023-12-19 at 10 45 09

@ChaseStas
Copy link

@bojanstef It’s only possible in the project. But here we are trying to use MetalPetal in SPM package as you can see on screenshot

@bojanstef
Copy link

From searching around it seems it's not possible at all in the SPM package, a potential hacky workaround is something like this:

https://developer.apple.com/forums/thread/649579?answerId=614162022#614162022

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants