Skip to content

Commit

Permalink
Workaround for Swift PM bug
Browse files Browse the repository at this point in the history
  • Loading branch information
sjanuary authored Sep 7, 2017
1 parent 4e0c418 commit e30bf90
Showing 1 changed file with 43 additions and 2 deletions.
45 changes: 43 additions & 2 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,51 @@ import PackageDescription

#if os(Linux)
let excludePortDir = "ibmras/common/port/osx"

let package = Package(
name: "omr-agentcore",
products: [
// omr-agentcore libraries.
.library(name: "agentcore", type: .dynamic, targets: ["agentcore"]),
.library(name: "hcapiplugin", type: .dynamic, targets: ["hcapiplugin"]),
.library(name: "memplugin", type: .dynamic, targets: ["memplugin"]),
.library(name: "cpuplugin", type: .dynamic, targets: ["cpuplugin"]),
.library(name: "envplugin", type: .dynamic, targets: ["envplugin"]),
.library(name: "mqttplugin", type: .dynamic, targets: ["mqttplugin"]),
.library(name: "paho", type: .dynamic, targets: ["paho"])
],
targets: [
// omr-agentcore targets, one for each library.
.target(name: "agentcore",
exclude: [ "ibmras/common/port/aix",
"ibmras/common/port/windows",
"ibmras/common/data",
"ibmras/common/util/memUtils.cpp",
"ibmras/monitoring/connector/headless",
excludePortDir
]),
.target(name: "paho",
exclude: [ "Windows Build",
"build",
"doc",
"test",
"src/MQTTClient.c",
"src/MQTTVersion.c",
"src/SSLSocket.c",
"src/samples",
]),
.target(name: "mqttplugin", dependencies: ["paho"]),
.target(name: "cpuplugin"),
.target(name: "envplugin"),
.target(name: "memplugin"),
// Workaround for Swift bug https://bugs.swift.org/browse/SR-5849
.target(name: "hcapiplugin")
]
)
#else
let excludePortDir = "ibmras/common/port/linux"
#endif

let package = Package(
let package = Package(
name: "omr-agentcore",
products: [
// omr-agentcore libraries.
Expand Down Expand Up @@ -48,3 +88,4 @@ let package = Package(
.target(name: "hcapiplugin", dependencies: ["agentcore"])
]
)
#endif

0 comments on commit e30bf90

Please sign in to comment.