Skip to content

Commit

Permalink
Build as dynamic library on Linux
Browse files Browse the repository at this point in the history
  • Loading branch information
colemancda committed Apr 13, 2021
1 parent 50c3824 commit 44326cd
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion Package.swift
Original file line number Diff line number Diff line change
@@ -1,14 +1,24 @@
// swift-tools-version:5.1
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: "NordicDFU",
platforms: [
.macOS(.v10_11), .iOS(.v9), .tvOS(.v9), .watchOS(.v2)
.macOS(.v10_11),
.iOS(.v9),
.tvOS(.v9),
.watchOS(.v2)
],
products: [
.library(
name: "NordicDFU",
type: libraryType,
targets: ["NordicDFU"]
),
.executable(
Expand Down

0 comments on commit 44326cd

Please sign in to comment.