serve-sim-sjchmiela 0.1.55 → 0.1.57

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/Package.swift CHANGED
@@ -14,8 +14,12 @@
14
14
  // arch only, and cross-compiling per-arch with `--triple` breaks the
15
15
  // `#NodeModule` macro.
16
16
 
17
+ import Foundation
17
18
  import PackageDescription
18
19
 
20
+ let packageRoot = URL(fileURLWithPath: #filePath).deletingLastPathComponent().path
21
+ let liveKitWebRTCFrameworkSearchPath = "\(packageRoot)/bin"
22
+
19
23
  let package = Package(
20
24
  name: "serve-sim-native",
21
25
  platforms: [.macOS(.v14)],
@@ -23,7 +27,7 @@ let package = Package(
23
27
  .library(
24
28
  name: "serve-sim-native",
25
29
  type: .dynamic,
26
- targets: ["SimNativeModule"]
30
+ targets: ["SimNative"]
27
31
  ),
28
32
  ],
29
33
  dependencies: [
@@ -31,42 +35,25 @@ let package = Package(
31
35
  ],
32
36
  targets: [
33
37
  .target(
34
- name: "SimNativeModule",
38
+ name: "SimNative",
35
39
  dependencies: [
36
40
  .product(name: "NodeAPI", package: "node-swift"),
37
41
  .product(name: "NodeModuleSupport", package: "node-swift"),
38
42
  ],
39
- path: "Sources",
40
- // Sibling targets built by their own build.sh (Obj-C/ObjC++), not
41
- // part of this SwiftPM package.
42
43
  exclude: [
43
- "SimCameraInjector",
44
- "SimCameraHelper",
45
- "SimAXSettings",
46
- "SimNative/build.sh",
47
- ],
48
- sources: [
49
- "SimNative/sim-module.swift",
50
- "SimNative/sim-capture.swift",
51
- "SimStreamHelper/WebRTCPublisher.swift",
52
- "SimStreamHelper/HIDInjector.swift",
53
- "SimStreamHelper/FrameCapture.swift",
54
- "SimStreamHelper/VideoEncoder.swift",
55
- "SimStreamHelper/H264Encoder.swift",
56
- "SimStreamHelper/StreamFormat.swift",
57
- "SimStreamHelper/AccessibilityBridge.swift",
58
- "SimStreamHelper/SimFrameworks.swift",
59
- "SimStreamHelper/Xcode.swift",
44
+ "build.sh",
60
45
  ],
61
46
  swiftSettings: [
62
- .unsafeFlags(["-F", "bin"]),
47
+ .unsafeFlags(["-F", liveKitWebRTCFrameworkSearchPath]),
63
48
  ],
64
49
  linkerSettings: [
65
50
  .unsafeFlags([
66
- "-F", "bin",
51
+ "-F", liveKitWebRTCFrameworkSearchPath,
67
52
  "-framework", "LiveKitWebRTC",
68
53
  "-Xlinker", "-rpath",
69
54
  "-Xlinker", "@loader_path/../bin",
55
+ "-Xlinker", "-undefined",
56
+ "-Xlinker", "dynamic_lookup",
70
57
  ]),
71
58
  .linkedFramework("CoreVideo"),
72
59
  .linkedFramework("CoreMedia"),