Skip to content

Commit

Permalink
What if we build this as a static library on Windows?
Browse files Browse the repository at this point in the history
  • Loading branch information
migueldeicaza committed Oct 5, 2024
1 parent 889be8c commit 793a278
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,6 @@ import CompilerPluginSupport

// Products define the executables and libraries a package produces, and make them visible to other packages.
var products: [Product] = [
.library(
name: "SwiftGodot",
type: .dynamic,
targets: ["SwiftGodot"]),
.library(
name: "SwiftGodotStatic",
targets: ["SwiftGodot"]),
Expand All @@ -30,6 +26,20 @@ var products: [Product] = [
.plugin(name: "CodeGeneratorPlugin", targets: ["CodeGeneratorPlugin"]),
]

#if os(Windows)
products.append(
.library(
name: "SwiftGodot",
type: .static,
targets: ["SwiftGodot"]))
#else
products.append(
.library(
name: "SwiftGodot",
type: .dynamic,
targets: ["SwiftGodot"]))
#endif

// Macros aren't supported on Windows before 5.9.1 and this sample uses them
#if !(os(Windows) && swift(<5.9.1))
products.append(
Expand Down

0 comments on commit 793a278

Please sign in to comment.