Skip to content

Commit

Permalink
Added library type capability
Browse files Browse the repository at this point in the history
  • Loading branch information
AntPRams committed Nov 23, 2024
1 parent fc2b182 commit dd2b744
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
// The swift-tools-version declares the minimum version of Swift required to build this package.

import PackageDescription
import Foundation

let isStatic = ProcessInfo.processInfo.environment["STATIC_LIB"] == "1"

let package = Package(
name: "DesignSystem",
Expand All @@ -12,6 +15,7 @@ let package = Package(
// Products define the executables and libraries a package produces, making them visible to other packages.
.library(
name: "DesignSystem",
type: isStatic ? .static : .dynamic,
targets: ["DesignSystem"]),
],
targets: [
Expand Down

0 comments on commit dd2b744

Please sign in to comment.