mirror of
https://github.com/recp/cglm.git
synced 2025-10-04 09:08:53 +00:00
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:
45
Package.swift
Normal file
45
Package.swift
Normal 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
0
dummySrcForSwift/empty.c
Normal file
14
include/module.modulemap
Normal file
14
include/module.modulemap
Normal 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 *
|
||||
}
|
Reference in New Issue
Block a user