Examples of Swift Package Manager
Simple (automatically generated) modulemap
- Simple (Swift) - CHello
- CHello (Clang)
tree
.
├── Sources
│ ├── CHello
│ │ └── include
│ └── Simple
└── Tests
└── SimpleTests
One of Clang package (CHello
) linked another C static library (libhello/lib/libhello.a
)
- Staticlib (Swift) - CHello
- CHello (Clang) - libhello (
libhello.a
) - libhello (Clang)
tree
.
├── Sources
│ ├── CHello
│ │ ├── include
│ │ └── src
│ ├── Staticlib
│ └── libhello
│ ├── bin
│ ├── example
│ ├── include
│ ├── lib
│ ├── src
│ └── tmp
└── Tests
└── StaticlibTests
Cpp called from extern linkage C header
- CLinkage (Swift) - CppHello
- CppHello (Cpp)
tree
.
├── Sources
│ ├── CLinkage
│ └── CppHello
│ └── include
└── Tests
└── CLinkageTests
- Simple (Swift) - ObjcHello
- ObjcHello (Objc)
tree
.
├── Sources
│ ├── ObjcHello
│ │ └── include
│ └── Simple
└── Tests
└── SimpleTests
- GitHubLib (Swift) - PlayingCard
- PlayingCard (Swift) from GitHub - apple/example-package-playingcard
tree
.
├── Sources
│ └── GitHubLib
└── Tests
└── GitHubLibTests
- MultiLayer (Swift) - FooBar
- FooBar (Swift)
tree
.
├── Sources
│ ├── FooBar
│ │ ├── Sources
│ │ │ ├── Bar
│ │ │ ├── Foo
│ │ │ └── FooBar
│ │ └── Tests
│ │ └── FooBarTests
│ └── MultiLayer
└── Tests
└── MultiLayerTests
- MultiModule (Swift) - Bar, Foo
- Bar (Swift)
- Foo (Swift)
tree
.
├── Sources
│ ├── Bar
│ ├── Foo
│ └── MultiModule
└── Tests
└── MultiModuleTests
- Simple (Swift)
tree
.
├── Sources
│ └── Simple
└── Tests
└── SimpleTests
$ make test
$ make clean