Need help with SwiftPM Clang search paths

I'm trying to modify some of my C/C++ packages to use git submodules and not change any source code to make them more maintainable.

I have a package that is made up of several repositories and I'm having trouble getting Clang from SwiftPM to see headers included with "<...>".

I've tried this unsafe flag -isystem<directory> but it didn't work.
Clang command line argument reference — Clang 16.0.0git documentation.

I also tried splitting each repository into it's own target, but unfortunately the project has namespace inline includes that cause redundant include errors. So it need to be a single target.

Here's the project setup that I would have expected to work.

Is SwiftPM blocking system header search paths for safety or something? This compiles just fine with Clang outside of SwiftPM.

1 Like

Solved.

The problem was the #include <bx...> was in a public header.
I was able to solve the problem by dropping some symlinks in the public header directory.