Open bryanaamot opened 1 month ago
I created some example steps that worked for me. Prior to doing this I was trying to include the skip-demo-main SPM in my project because I didn't understand that I only needed to include the LibCLibrary. Duh!
Copy LibCLibrary folder into your project's Sources directory
In your Package.swift file, add the following to the products array:
.library(name: "LibCLibrary", type: .dynamic, targets: ["LibCLibrary"]),
Add the following to the dependencies array (if not already there):
.package(url: "https://source.skip.tools/skip-unit.git", from: "0.7.0"),
Add the following to the targets array:
.target(name: "LibCLibrary", dependencies: [
.product(name: "SkipUnit", package: "skip-unit")
], sources: ["src"], publicHeadersPath: "include", plugins: [.plugin(name: "skipstone", package: "skip")]),
In your source code, add
#if !SKIP
import LibCLibrary
#endif
let string = LibCLibrary.demo_string()
let text = String(cString: string!)
Text("\(text)")
Any chance we could get step by step instruction on how to use this project? I tried
swift build
then imported the SPM into a project. But when Iimport SkipCDemo
it saysMissing required module 'LibCLibrary'
. I see the CMakeLists.txt, but don't know if I should runcmake .
or what. A step by step instruction would be nice even for a 35+ year veteran developer like myself. I'm very hopeful for this effort and interested in contributing.