I am developing a framework, and would like to include my files as submodules. I am currently running a build script to output a universal fat framework that can run on all architectures. However, the framework's module.modulemap file always comes out like so:
framework module MyFramework {
umbrella header "MyFramework.h"
export *
module * { export * }
}
When this framework is placed in a sample project, I will get the warning "Missing submodule MyFramework.PublicFile". In order to get this warning to go away, I have to manually input the public files I'd like to include as submodules, so that the module.modulemap file looks like this:
framework module MyFramework {
umbrella header "MyFramework.h"
header "PublicFile.h"
header "OtherPublicFile.h"
export *
module * {export *}
}
So the problem is that whenever I rebuild my framework, the module map is reverted to the first file. The other problem I want to avoid having to manually add a lot of public headers to this file as MyFramework grows. Is there any script I can implement either in my Universal Framework script, or in a different build script that I can set once that will write to this file when I compile the framework?