Created
September 20, 2015 18:01
-
-
Save zwaldowski/dcd218ae7334fba5833d to your computer and use it in GitHub Desktop.
Using "private" C module from Swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SWIFT_INCLUDE_PATHS = $(SRCROOT) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import MyModule.Private | |
// use stuff from "MyModule" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This should be in a directory "$(SRCROOT)/MyModule" | |
# and named "module.modulemap". | |
module MyModule { | |
export * | |
#link "system" | |
#link framework "Foo" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This should be in a directory "$(SRCROOT)/MyModule" | |
# and named "module.private.modulemap". | |
explicit module MyModule.Private { | |
header "UmbrellaHeader.h" | |
header "OtherHeader.h" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
if I use this technique in a framework, the private module will be part of the framework bitcode? no need to import the dependency module in the project where I use the framework ?