We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 025e3bc commit 897920aCopy full SHA for 897920a
Package.swift
@@ -1,6 +1,11 @@
1
// swift-tools-version:6.0
2
import PackageDescription
3
import CompilerPluginSupport
4
+import class Foundation.ProcessInfo
5
+
6
+// force building as dynamic library
7
+let dynamicLibrary = ProcessInfo.processInfo.environment["SWIFT_BUILD_DYNAMIC_LIBRARY"] != nil
8
+let libraryType: PackageDescription.Product.Library.LibraryType? = dynamicLibrary ? .dynamic : nil
9
10
let package = Package(
11
name: "CoreModel",
@@ -13,12 +18,14 @@ let package = Package(
13
18
products: [
14
19
.library(
15
20
21
+ type: libraryType,
16
22
targets: [
17
23
"CoreModel"
24
]
25
),
26
27
name: "CoreDataModel",
28
29
30
"CoreDataModel"
31
0 commit comments