From 73f32b9ef7e927f399a27a6ad8efe78368dda5d0 Mon Sep 17 00:00:00 2001 From: Serhii Mumriak Date: Mon, 7 Sep 2020 17:26:33 -0700 Subject: [PATCH] Updated README.md with swift configuration information --- README.md | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/README.md b/README.md index aceb123..595812e 100644 --- a/README.md +++ b/README.md @@ -212,6 +212,38 @@ cglm_dep = dependency('cglm', fallback : 'cglm', 'cglm_dep') executable('exe', 'src/main.c', dependencies : cglm_dep) ``` +### Swift (Swift Package Manager) + +Currently only default build options are supported. Add **cglm** dependency to your project: + +```swift +... +Package( + ... + dependencies: [ + ... + .package(url: "https://github.com/recp/cglm", .branch("master")), + ] + ... +) +``` + +Now add **cgml** as a dependency to your target. Product choices are: +- **cglm** for inlined version of the library which can be linked only statically +- **cglmc** for a compiled version of the library with no linking limitation + +```swift +... +.target( + ... + dependencies: [ + ... + .product(name: "cglm", package: "cglm"), + ] + ... +) +... +``` ### Unix (Autotools)