Where to place custom module.modulemap for third party C library without touching their source code

SwiftPM always generates a modulemap for C libraries, even if they don't have an umbrella header. Try to find the generated modulemap in the .build directory. One possibility is that the module name generated for XXX could be normalized by SwiftPM. The import statement must mention the module name defined in the modulemap.

I've found symlinks to the files inside the submodule directory to work pretty well. The downside is that you have to create them by hand but you can automate that using some script.