@@ -73,7 +73,7 @@ if development {
73
73
// MARK: - [env] OPENSWIFTUI_LINK_COREUI
74
74
75
75
#if os(macOS)
76
- let linkCoreUI = envEnable ( " OPENSWIFTUI_LINK_COREUI " , default: false )
76
+ let linkCoreUI = envEnable ( " OPENSWIFTUI_LINK_COREUI " , default: true )
77
77
#else
78
78
let linkCoreUI = envEnable ( " OPENSWIFTUI_LINK_COREUI " )
79
79
#endif
@@ -90,6 +90,14 @@ if linkCoreUI {
90
90
)
91
91
}
92
92
93
+ // MARK: - [env] OPENGSWIFTUI_SYMBOL_LOCATOR
94
+
95
+ #if os(macOS)
96
+ let symbolLocatorCondition = envEnable ( " OPENGSWIFTUI_SYMBOL_LOCATOR " , default: true )
97
+ #else
98
+ let symbolLocatorCondition = envEnable ( " OPENGSWIFTUI_SYMBOL_LOCATOR " )
99
+ #endif
100
+
93
101
// MARK: - [env] OPENGSWIFTUI_SWIFTUI_RENDER
94
102
95
103
#if os(macOS)
@@ -110,7 +118,7 @@ let warningsAsErrorsCondition = envEnable("OPENSWIFTUI_WERROR", default: isXcode
110
118
if warningsAsErrorsCondition {
111
119
// Hold off the werror feature as we can't avoid the concurrency warning.
112
120
// Reenable the folllowing after swift-evolution#443 is release.
113
-
121
+
114
122
// sharedSwiftSettings.append(.unsafeFlags(["-warnings-as-errors"]))
115
123
// sharedSwiftSettings.append(.unsafeFlags(["-Wwarning", "concurrency"]))
116
124
}
@@ -168,7 +176,9 @@ let openSwiftUICoreTarget = Target.target(
168
176
" CoreGraphicsShims " ,
169
177
. product( name: " OpenGraphShims " , package : " OpenGraph " ) ,
170
178
. product( name: " OpenBoxShims " , package : " OpenBox " ) ,
171
- ] + ( swiftUIRenderCondition ? [ " OpenSwiftUISymbolDualTestsSupport " ] : [ ] ) ,
179
+ ] + ( swiftUIRenderCondition && symbolLocatorCondition ? [ " OpenSwiftUISymbolDualTestsSupport " ] : [ ] ) ,
180
+ cSettings: sharedCSettings,
181
+ cxxSettings: sharedCxxSettings,
172
182
swiftSettings: sharedSwiftSettings
173
183
)
174
184
@@ -181,6 +191,8 @@ let openSwiftUICoreTestTarget = Target.testTarget(
181
191
. product( name: " Numerics " , package : " swift-numerics " ) ,
182
192
] ,
183
193
exclude: [ " README.md " ] ,
194
+ cSettings: sharedCSettings,
195
+ cxxSettings: sharedCxxSettings,
184
196
swiftSettings: sharedSwiftSettings
185
197
)
186
198
@@ -192,7 +204,8 @@ let cOpenSwiftUITarget = Target.target(
192
204
cSettings: sharedCSettings + [
193
205
. headerSearchPath( " ../OpenSwiftUI_SPI " ) ,
194
206
] ,
195
- cxxSettings: sharedCxxSettings
207
+ cxxSettings: sharedCxxSettings,
208
+ swiftSettings: sharedSwiftSettings
196
209
)
197
210
198
211
let openSwiftUITarget = Target . target (
@@ -205,6 +218,8 @@ let openSwiftUITarget = Target.target(
205
218
. product( name: " OpenGraphShims " , package : " OpenGraph " ) ,
206
219
. product( name: " OpenBoxShims " , package : " OpenBox " ) ,
207
220
] ,
221
+ cSettings: sharedCSettings,
222
+ cxxSettings: sharedCxxSettings,
208
223
swiftSettings: sharedSwiftSettings
209
224
)
210
225
@@ -221,6 +236,8 @@ let openSwiftUIExtensionTarget = Target.target(
221
236
dependencies: [
222
237
" OpenSwiftUI " ,
223
238
] ,
239
+ cSettings: sharedCSettings,
240
+ cxxSettings: sharedCxxSettings,
224
241
swiftSettings: sharedSwiftSettings
225
242
)
226
243
@@ -231,6 +248,8 @@ let openSwiftUITestTarget = Target.testTarget(
231
248
" OpenSwiftUITestsSupport " ,
232
249
] ,
233
250
exclude: [ " README.md " ] ,
251
+ cSettings: sharedCSettings,
252
+ cxxSettings: sharedCxxSettings,
234
253
swiftSettings: sharedSwiftSettings
235
254
)
236
255
@@ -241,6 +260,8 @@ let openSwiftUICompatibilityTestTarget = Target.testTarget(
241
260
. product( name: " Numerics " , package : " swift-numerics " ) ,
242
261
] ,
243
262
exclude: [ " README.md " ] ,
263
+ cSettings: sharedCSettings,
264
+ cxxSettings: sharedCxxSettings,
244
265
swiftSettings: sharedSwiftSettings
245
266
)
246
267
@@ -256,6 +277,8 @@ let openSwiftUIBridgeTarget = Target.target(
256
277
" OpenSwiftUI " ,
257
278
] ,
258
279
sources: [ " Bridgeable.swift " , bridgeFramework] ,
280
+ cSettings: sharedCSettings,
281
+ cxxSettings: sharedCxxSettings,
259
282
swiftSettings: sharedSwiftSettings
260
283
)
261
284
@@ -267,6 +290,8 @@ let openSwiftUIBridgeTestTarget = Target.testTarget(
267
290
] ,
268
291
exclude: [ " README.md " ] ,
269
292
sources: [ " BridgeableTests.swift " , bridgeFramework] ,
293
+ cSettings: sharedCSettings,
294
+ cxxSettings: sharedCxxSettings,
270
295
swiftSettings: sharedSwiftSettings
271
296
)
272
297
@@ -281,7 +306,8 @@ let openSwiftUISymbolDualTestsSupportTarget = Target.target(
281
306
cSettings: sharedCSettings + [
282
307
. headerSearchPath( " ../OpenSwiftUI_SPI " ) ,
283
308
] ,
284
- cxxSettings: sharedCxxSettings
309
+ cxxSettings: sharedCxxSettings,
310
+ swiftSettings: sharedSwiftSettings
285
311
)
286
312
287
313
let openSwiftUISymbolDualTestsTarget = Target . testTarget (
@@ -292,6 +318,8 @@ let openSwiftUISymbolDualTestsTarget = Target.testTarget(
292
318
" OpenSwiftUISymbolDualTestsSupport " ,
293
319
] ,
294
320
exclude: [ " README.md " ] ,
321
+ cSettings: sharedCSettings,
322
+ cxxSettings: sharedCxxSettings,
295
323
swiftSettings: sharedSwiftSettings
296
324
)
297
325
@@ -324,8 +352,7 @@ let package = Package(
324
352
name: " OpenSwiftUI " ,
325
353
products: products,
326
354
dependencies: [
327
- . package ( url: " https://github.com/apple/swift-numerics.git " , from: " 1.0.2 " ) ,
328
- . package ( url: " https://github.com/OpenSwiftUIProject/SymbolLocator.git " , from: " 0.1.0 " ) ,
355
+ . package ( url: " https://github.com/apple/swift-numerics.git " , from: " 1.0.3 " ) ,
329
356
] ,
330
357
targets: [
331
358
// TODO: Add SwiftGTK as an backend alternative for UIKit/AppKit on Linux and macOS
@@ -357,9 +384,6 @@ let package = Package(
357
384
358
385
openSwiftUIBridgeTarget,
359
386
openSwiftUIBridgeTestTarget,
360
-
361
- openSwiftUISymbolDualTestsSupportTarget,
362
- openSwiftUISymbolDualTestsTarget
363
387
]
364
388
)
365
389
@@ -372,7 +396,7 @@ extension Target {
372
396
swiftSettings. append ( . define( " OPENGRAPH_ATTRIBUTEGRAPH " ) )
373
397
self . swiftSettings = swiftSettings
374
398
}
375
-
399
+
376
400
func addRBSettings( ) {
377
401
// FIXME: Weird SwiftPM behavior for test Target. Otherwize we'll get the following error message
378
402
// "could not determine executable path for bundle 'RenderBox.framework'"
@@ -401,7 +425,7 @@ extension Target {
401
425
swiftSettings. append ( . define( " OPENSWIFTUI_SWIFT_LOG " ) )
402
426
self . swiftSettings = swiftSettings
403
427
}
404
-
428
+
405
429
func addSwiftCryptoSettings( ) {
406
430
dependencies. append ( . product( name: " Crypto " , package : " swift-crypto " ) )
407
431
var swiftSettings = swiftSettings ?? [ ]
@@ -421,7 +445,7 @@ let attributeGraphCondition = envEnable("OPENGRAPH_ATTRIBUTEGRAPH")
421
445
if attributeGraphCondition {
422
446
openSwiftUICoreTarget. addAGSettings ( )
423
447
openSwiftUITarget. addAGSettings ( )
424
-
448
+
425
449
openSwiftUISPITestTarget. addAGSettings ( )
426
450
openSwiftUICoreTestTarget. addAGSettings ( )
427
451
openSwiftUITestTarget. addAGSettings ( )
@@ -438,7 +462,7 @@ let renderBoxCondition = envEnable("OPENBOX_RENDERBOX")
438
462
if renderBoxCondition {
439
463
openSwiftUICoreTarget. addRBSettings ( )
440
464
openSwiftUITarget. addRBSettings ( )
441
-
465
+
442
466
openSwiftUISPITestTarget. addRBSettings ( )
443
467
openSwiftUICoreTestTarget. addRBSettings ( )
444
468
openSwiftUITestTarget. addRBSettings ( )
@@ -528,6 +552,19 @@ if compatibilityTestCondition {
528
552
openSwiftUICompatibilityTestTarget. dependencies. append ( " OpenSwiftUI " )
529
553
}
530
554
555
+ // MARK: - SymbolLocator
556
+
557
+ if symbolLocatorCondition {
558
+ package . dependencies. append (
559
+ . package ( url: " https://github.com/OpenSwiftUIProject/SymbolLocator.git " , from: " 0.2.0 " )
560
+ )
561
+
562
+ package . targets += [
563
+ openSwiftUISymbolDualTestsSupportTarget,
564
+ openSwiftUISymbolDualTestsTarget,
565
+ ]
566
+ }
567
+
531
568
extension [ Platform ] {
532
569
static var darwinPlatforms : [ Platform ] {
533
570
[ . macOS, . iOS, . macCatalyst, . tvOS, . watchOS, . visionOS]
0 commit comments