Skip to content

Commit

Permalink
Fix 'swift build'
Browse files Browse the repository at this point in the history
  • Loading branch information
radare committed Apr 10, 2024
1 parent d8b0642 commit e1a1bdb
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 6 deletions.
6 changes: 5 additions & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ let package = Package(
],
dependencies: [],
targets: [
.target(name: "r2pipeLibrary", path: "swift", sources: ["r2pipe.swift", "r2pipeNative.swift"]),
.target(
name: "r2pipeLibrary",
path: "swift",
sources: ["r2pipe.swift", "r2pipeNative.swift"]
),
]
)
4 changes: 2 additions & 2 deletions swift/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ TARGET=osx

SDKROOT=SDKROOT="$(shell xcrun --show-sdk-path --sdk ${SDK})"
SC=$(SDKROOT) xcrun -sdk $(SDK) swiftc
SFILES=r2pipe.swift
SFILES=Sources/r2pipe/r2pipe.swift

USE_SPAWN=1
USE_CCALL=1
Expand Down Expand Up @@ -32,7 +32,7 @@ SFLAGS+=-D USE_ENV_PIPE
endif
ifeq ($(USE_SPAWN),1)
SFLAGS+=-D USE_SPAWN
SFILES+=r2pipeNative.swift
SFILES+=Sources/r2pipe/r2pipeNative.swift
endif
ifeq ($(USE_NSURL_SESSION),1)
SFLAGS+=-D USE_NSURL_SESSION
Expand Down
4 changes: 2 additions & 2 deletions swift/Package.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// swift-tools-version:5.8
// swift-tools-version:5.10

import PackageDescription

Expand All @@ -9,6 +9,6 @@ let package = Package(
],
dependencies: [],
targets: [
.target(name: "r2pipe", path: ".", sources: ["r2pipe.swift", "r2pipeNative.swift"]),
.target(name: "r2pipe")
]
)
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion swift/main.swift
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ private func testCcall() {

print("Hello r2pipe.swift!")

testSpawn()
// testSpawn()
testCcall()
// if let r2p = R2Pipe() { //"#!pipe") {
/*
Expand Down

0 comments on commit e1a1bdb

Please sign in to comment.