Added simple swiftpm package file with module map and empty C file to trick the compiler to build the empty C target.

This commit is contained in:
Serhii Mumriak
2020-09-05 20:39:12 -07:00
parent e34601f578
commit 65b0b461ab
3 changed files with 59 additions and 0 deletions

45
Package.swift Normal file
View File

@@ -0,0 +1,45 @@
// swift-tools-version:5.2
import PackageDescription
let package = Package(
name: "cglm",
products: [
.library(name: "cglm", type: .static, targets: ["cglmHeader"]),
.library(name: "cglmc", targets: ["cglmCompiled"]),
],
dependencies: [],
targets: [
.target(
name: "cglmCompiled",
path: "./",
exclude: [
"./docs",
"./dummySrcForSwift",
"./include",
"./test",
"./win",
],
sources: [
"./src",
],
publicHeadersPath: "./include"
),
.target(
name: "cglmHeader",
path: "./",
exclude: [
"./docs",
"./include",
"./src",
"./test",
"./win",
],
sources: [
"./dummySrcForSwift",
],
publicHeadersPath: "./include"
),
],
cLanguageStandard: .c11
)

0
dummySrcForSwift/empty.c Normal file
View File

14
include/module.modulemap Normal file
View File

@@ -0,0 +1,14 @@
module cglm {
header "cglm/cglm.h"
header "cglm/struct.h"
export *
}
module cglmc {
header "cglm/cglm.h"
header "cglm/struct.h"
header "cglm/call.h"
export *
}