I created my own wrapper around a dylib. I then created a header file to export symbols from this library. I run into the situation where this header is in the wrapper and modulemap can't find it.
> MyFramework (project directory)
> MyFramework.xcconfig
MODULEMAP_FILE[sdk=macosx*] = $(SRCROOT)/MyFramework/macosx.modulemap
> macosx.modulemap:
module MyFramework [system] {
header "MyFramework.h" // CAN NOT FIND THE FILE
export *
}
> MyFramwork.h (contains a bunch of declarations)
I found examples with absolute paths pointing in the SDK but I really don't want to hard-code the path to my project on my local drive.
I tried prefixing the file name with $(SRCROOT)/MyFramework and other relative options but no luck.
What should I use instead?
In the clang module documentation you find the documentation for Module Maps. Especially there is a framework
keyword for Mac OS X frameworks. So you should use
framework module MyFramework [system] {
header "MyFramework.h"
export *
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With