@@ -122,63 +122,52 @@ def getToolchain(self, arch, target):
122
122
123
123
def getCMakeArgs (self , arch , target ):
124
124
125
- if self .dynamic :
126
- args = [
127
- "cmake" ,
128
- "-GXcode" ,
129
- "-DAPPLE_FRAMEWORK=ON" ,
130
- "-DCMAKE_INSTALL_PREFIX=install" ,
131
- "-DCMAKE_BUILD_TYPE=Release" ,
132
- "-DBUILD_SHARED_LIBS=ON" ,
133
- "-DCMAKE_MACOSX_BUNDLE=ON" ,
134
- "-DCMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_REQUIRED=NO" ,
135
- ]
136
- else :
137
- args = [
138
- "cmake" ,
139
- "-GXcode" ,
140
- "-DAPPLE_FRAMEWORK=ON" ,
141
- "-DCMAKE_INSTALL_PREFIX=install" ,
142
- "-DCMAKE_BUILD_TYPE=Release" ,
143
- ]
125
+ args = [
126
+ "cmake" ,
127
+ "-GXcode" ,
128
+ "-DAPPLE_FRAMEWORK=ON" ,
129
+ "-DCMAKE_INSTALL_PREFIX=install" ,
130
+ "-DCMAKE_BUILD_TYPE=Release" ,
131
+ ] + ([
132
+ "-DBUILD_SHARED_LIBS=ON" ,
133
+ "-DCMAKE_MACOSX_BUNDLE=ON" ,
134
+ "-DCMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_REQUIRED=NO" ,
135
+ ] if self .dynamic else [])
144
136
145
137
if len (self .exclude ) > 0 :
146
138
args += ["-DBUILD_opencv_world=OFF" ]
147
- args += ( "-DBUILD_opencv_%s=OFF" % m for m in self .exclude )
139
+ args += [ "-DBUILD_opencv_%s=OFF" % m for m in self .exclude ]
148
140
149
141
return args
150
142
151
143
def getBuildCommand (self , archs , target ):
152
144
145
+ buildcmd = [
146
+ "xcodebuild" ,
147
+ ]
148
+
153
149
if self .dynamic :
154
- buildcmd = [
155
- "xcodebuild" ,
150
+ buildcmd += [
156
151
"IPHONEOS_DEPLOYMENT_TARGET=8.0" ,
157
152
"ONLY_ACTIVE_ARCH=NO" ,
158
153
]
159
154
160
155
for arch in archs :
161
156
buildcmd .append ("-arch" )
162
157
buildcmd .append (arch .lower ())
163
-
164
- buildcmd += [
165
- "-sdk" , target .lower (),
166
- "-configuration" , "Release" ,
167
- "-parallelizeTargets" ,
168
- "-jobs" , "4" ,
169
- "-target" ,"ALL_BUILD" ,
170
- ]
171
158
else :
172
159
arch = ";" .join (archs )
173
- buildcmd = [
174
- "xcodebuild" ,
160
+ buildcmd += [
175
161
"IPHONEOS_DEPLOYMENT_TARGET=6.0" ,
176
162
"ARCHS=%s" % arch ,
163
+ ]
164
+
165
+ buildcmd += [
177
166
"-sdk" , target .lower (),
178
167
"-configuration" , "Release" ,
179
168
"-parallelizeTargets" ,
180
- "-jobs" , "4"
181
- ]
169
+ "-jobs" , "4" ,
170
+ ] + ([ "-target" , "ALL_BUILD" ] if self . dynamic else [])
182
171
183
172
return buildcmd
184
173
0 commit comments