@@ -31,9 +31,9 @@ let isSPIBuild = envEnable("SPI_BUILD")
3131// MARK: - Env and Config
3232
3333let isXcodeEnv = Context . environment [ " __CFBundleIdentifier " ] == " com.apple.dt.Xcode "
34- let development = envEnable ( " OPENBOX_DEVELOPMENT " )
34+ let development = envEnable ( " OPENRENDERBOX_DEVELOPMENT " )
3535
36- let releaseVersion = Context . environment [ " OPENBOX_TARGET_RELEASE " ] . flatMap { Int ( $0) } ?? 2024
36+ let releaseVersion = Context . environment [ " OPENRENDERBOX_TARGET_RELEASE " ] . flatMap { Int ( $0) } ?? 2024
3737
3838let swiftBinPath = Context . environment [ " _ " ] ?? " /usr/bin/swift "
3939let swiftBinURL = URL ( fileURLWithPath: swiftBinPath)
@@ -54,37 +54,37 @@ var sharedSwiftSettings: [SwiftSetting] = [
5454 . swiftLanguageMode( . v5) ,
5555]
5656
57- // MARK: - [env] OPENBOX_LIBRARY_EVOLUTION
57+ // MARK: - [env] OPENRENDERBOX_LIBRARY_EVOLUTION
5858
59- let libraryEvolutionCondition = envEnable ( " OPENBOX_LIBRARY_EVOLUTION " , default: buildForDarwinPlatform)
59+ let libraryEvolutionCondition = envEnable ( " OPENRENDERBOX_LIBRARY_EVOLUTION " , default: buildForDarwinPlatform)
6060
6161if libraryEvolutionCondition {
6262 // NOTE: -enable-library-evolution will cause module verify failure for `swift build`.
63- // Either set OPENBOX_LIBRARY_EVOLUTION =0 or add `-Xswiftc -no-verify-emitted-module-interface` after `swift build`
63+ // Either set OPENRENDERBOX_LIBRARY_EVOLUTION =0 or add `-Xswiftc -no-verify-emitted-module-interface` after `swift build`
6464 sharedSwiftSettings. append ( . unsafeFlags( [ " -enable-library-evolution " , " -no-verify-emitted-module-interface " ] ) )
6565}
6666
6767// MARK: - Targets
6868
6969let openBoxTarget = Target . target (
70- name: " OpenBox " ,
70+ name: " OpenRenderBox " ,
7171 cSettings: sharedCSettings,
7272 cxxSettings: sharedCxxSettings
7373)
7474let openBoxShimsTarget = Target . target (
75- name: " OpenBoxShims " ,
75+ name: " OpenRenderBoxShims " ,
7676 swiftSettings: sharedSwiftSettings
7777)
7878let openBoxTestTarget = Target . testTarget (
79- name: " OpenBoxTests " ,
79+ name: " OpenRenderBoxTests " ,
8080 dependencies: [
81- " OpenBox " ,
81+ " OpenRenderBox " ,
8282 ] ,
8383 exclude: [ " README.md " ] ,
8484 swiftSettings: sharedSwiftSettings
8585)
8686let openBoxCompatibilityTestTarget = Target . testTarget (
87- name: " OpenBoxCompatibilityTests " ,
87+ name: " OpenRenderBoxCompatibilityTests " ,
8888 dependencies: [
8989 . product( name: " RealModule " , package : " swift-numerics " ) ,
9090 ] ,
@@ -95,7 +95,7 @@ let openBoxCompatibilityTestTarget = Target.testTarget(
9595// MARK: - Package
9696
9797let libraryType : Product . Library . LibraryType ?
98- switch Context . environment [ " OPENBOX_LIBRARY_TYPE " ] {
98+ switch Context . environment [ " OPENRENDERBOX_LIBRARY_TYPE " ] {
9999case " dynamic " :
100100 libraryType = . dynamic
101101case " static " :
@@ -105,10 +105,10 @@ default:
105105}
106106
107107let package = Package (
108- name: " OpenBox " ,
108+ name: " OpenRenderBox " ,
109109 products: [
110- . library( name: " OpenBox " , type: libraryType, targets: [ " OpenBox " ] ) ,
111- . library( name: " OpenBoxShims " , type: libraryType, targets: [ " OpenBoxShims " ] ) ,
110+ . library( name: " OpenRenderBox " , type: libraryType, targets: [ " OpenRenderBox " ] ) ,
111+ . library( name: " OpenRenderBoxShims " , type: libraryType, targets: [ " OpenRenderBoxShims " ] ) ,
112112 ] ,
113113 dependencies: [
114114 . package ( url: " https://github.com/apple/swift-numerics " , from: " 1.0.2 " ) ,
@@ -123,9 +123,9 @@ let package = Package(
123123 cxxLanguageStandard: . cxx20
124124)
125125
126- let useLocalDeps = envEnable ( " OPENBOX_USE_LOCAL_DEPS " )
126+ let useLocalDeps = envEnable ( " OPENRENDERBOX_USE_LOCAL_DEPS " )
127127
128- let renderBoxCondtion = envEnable ( " OPENBOX_RENDERBOX " , default: buildForDarwinPlatform && !isSPIBuild )
128+ let renderBoxCondtion = envEnable ( " OPENRENDERBOX_RENDERBOX " , default: buildForDarwinPlatform && !isSPIBuild )
129129
130130if renderBoxCondtion {
131131 let privateFrameworkRepo : Package . Dependency
@@ -136,7 +136,7 @@ if renderBoxCondtion {
136136 }
137137 package . dependencies. append ( privateFrameworkRepo)
138138 var swiftSettings : [ SwiftSetting ] = ( openBoxShimsTarget. swiftSettings ?? [ ] )
139- swiftSettings. append ( . define( " OPENBOX_RENDERBOX " ) )
139+ swiftSettings. append ( . define( " OPENRENDERBOX_RENDERBOX " ) )
140140 openBoxShimsTarget. swiftSettings = swiftSettings
141141 openBoxShimsTarget. dependencies. append (
142142 . product( name: " RenderBox " , package : " DarwinPrivateFrameworks " )
@@ -149,20 +149,20 @@ if renderBoxCondtion {
149149 default : nil
150150 }
151151} else {
152- openBoxShimsTarget. dependencies. append ( " OpenBox " )
152+ openBoxShimsTarget. dependencies. append ( " OpenRenderBox " )
153153}
154154
155- let compatibilityTestCondition = envEnable ( " OPENBOX_COMPATIBILITY_TEST " )
155+ let compatibilityTestCondition = envEnable ( " OPENRENDERBOX_COMPATIBILITY_TEST " )
156156if compatibilityTestCondition && renderBoxCondtion {
157157 openBoxCompatibilityTestTarget. dependencies. append (
158158 . product( name: " RenderBox " , package : " DarwinPrivateFrameworks " )
159159 )
160160
161161 var swiftSettings : [ SwiftSetting ] = ( openBoxCompatibilityTestTarget. swiftSettings ?? [ ] )
162- swiftSettings. append ( . define( " OPENBOX_COMPATIBILITY_TEST " ) )
162+ swiftSettings. append ( . define( " OPENRENDERBOX_COMPATIBILITY_TEST " ) )
163163 openBoxCompatibilityTestTarget. swiftSettings = swiftSettings
164164} else {
165- openBoxCompatibilityTestTarget. dependencies. append ( " OpenBox " )
165+ openBoxCompatibilityTestTarget. dependencies. append ( " OpenRenderBox " )
166166}
167167
168168extension [ Platform ] {
0 commit comments