File tree Expand file tree Collapse file tree 2 files changed +16
-1
lines changed
Expand file tree Collapse file tree 2 files changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -31,16 +31,30 @@ let isXcodeEnv = Context.environment["__CFBundleIdentifier"] == "com.apple.dt.Xc
3131
3232let development = envEnable ( " OPENGRAPHICS_DEVELOPMENT " )
3333
34+ // MARK: - [env] OPENGRAPHICS_COREGRAPHICS
35+
3436let coreGraphicsCondition = envEnable ( " OPENGRAPHICS_COREGRAPHICS " , default: buildForDarwinPlatform)
3537if coreGraphicsCondition {
3638 sharedSwiftSettings. append ( . define( " OPENGRAPHICS_COREGRAPHICS " ) )
3739}
3840
41+ // MARK: - [env] OPENGRAPHICS_WERROR
42+
3943let warningsAsErrorsCondition = envEnable ( " OPENGRAPHICS_WERROR " , default: isXcodeEnv && development)
4044if warningsAsErrorsCondition {
4145 sharedSwiftSettings. append ( . unsafeFlags( [ " -warnings-as-errors " ] ) )
4246}
4347
48+ // MARK: - [env] OPENGRAPHICS_LIBRARY_EVOLUTION
49+
50+ let libraryEvolutionCondition = envEnable ( " OPENGRAPHICS_LIBRARY_EVOLUTION " , default: buildForDarwinPlatform)
51+
52+ if libraryEvolutionCondition {
53+ // NOTE: -enable-library-evolution will cause module verify failure for `swift build`.
54+ // Either set OPENGRAPHICS_LIBRARY_EVOLUTION=0 or add `-Xswiftc -no-verify-emitted-module-interface` after `swift build`
55+ sharedSwiftSettings. append ( . unsafeFlags( [ " -enable-library-evolution " , " -no-verify-emitted-module-interface " ] ) )
56+ }
57+
4458let package = Package (
4559 name: " OpenGraphics " ,
4660 products: [
Original file line number Diff line number Diff line change 66// Modified from https://github.com/flowkey/UIKit-cross-platform/blob/7e28dc4c62d20afe03e55bbba660076ec06fd79a/Sources/CATransform3D.swift
77
88public import Foundation
9- public import struct OpenGraphics. CGAffineTransform
9+ public import OpenGraphics
10+ import struct OpenGraphics. CGAffineTransform
1011
1112public struct CATransform3D : Sendable {
1213 public init (
You can’t perform that action at this time.
0 commit comments