Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Swift Package Manager #173

Open
wants to merge 14 commits into
base: master
Choose a base branch
from

Conversation

maitbayev
Copy link
Contributor

@maitbayev maitbayev commented Jul 12, 2022

Almost all tests from iosMathTests pass with swift test command, except there are some numerical differences in MTTypesetterTest, probably coming from iOS/MacOS platform changes and unrelated to SPM.

The following things were added to satisfy the Swift Package Manager requirements:

  1. Adds include folder under iosMath with symlinked headers. SPM will automatically create module.modulemap from these headers for interoperability with Swift and Objective-C @import.
  2. Symlinks fonts folder under iosMath so that the folder is packaged into a module bundle. Pointing to ../fonts in Package.swift didn't work. Maybe it is cleaner to just move the fonts folder instead of symlinking?
  3. Use the SWIFTPM_MODULE_BUNDLE preprocessor to access the module bundle. See: https://github.com/apple/swift-evolution/blob/master/proposals/0271-package-manager-resources.md

@maitbayev
Copy link
Contributor Author

cc @kostub

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants