From 3b164033044885366801dfe97d01d26e7ce2fdf3 Mon Sep 17 00:00:00 2001 From: Alsey Coleman Miller Date: Sun, 30 Aug 2020 18:37:41 -0500 Subject: [PATCH] Compile as dynamic library on Linux --- Package.swift | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Package.swift b/Package.swift index 28e4720b..b1ff43c7 100644 --- a/Package.swift +++ b/Package.swift @@ -3,12 +3,19 @@ import PackageDescription +#if os(Linux) +let libraryType: PackageDescription.Product.Library.LibraryType = .dynamic +#else +let libraryType: PackageDescription.Product.Library.LibraryType = .static +#endif + let package = Package( name: "XMLCoder", products: [ // Products define the executables and libraries produced by a package, and make them visible to other packages. .library( name: "XMLCoder", + type: libraryType, targets: ["XMLCoder"] ), ],