Skip to content

Commit e009d79

Browse files
committed
fixup! Some changes to support mingw-w64
1 parent 771af4f commit e009d79

File tree

2 files changed

+11
-6
lines changed

2 files changed

+11
-6
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ OCV_OPTION(WITH_GSTREAMER "Include Gstreamer support" ON
171171
OCV_OPTION(WITH_GSTREAMER_0_10 "Enable Gstreamer 0.10 support (instead of 1.x)" OFF )
172172
OCV_OPTION(WITH_GTK "Include GTK support" ON IF (UNIX AND NOT APPLE AND NOT ANDROID) )
173173
OCV_OPTION(WITH_GTK_2_X "Use GTK version 2" OFF IF (UNIX AND NOT APPLE AND NOT ANDROID) )
174-
OCV_OPTION(WITH_IPP "Include Intel IPP support" ON IF (X86_64 OR X86) AND NOT WINRT AND NOT MINGW )
174+
OCV_OPTION(WITH_IPP "Include Intel IPP support" NOT MINGW IF (X86_64 OR X86) AND NOT WINRT )
175175
OCV_OPTION(WITH_JASPER "Include JPEG2K support" ON IF (NOT IOS) )
176176
OCV_OPTION(WITH_JPEG "Include JPEG support" ON)
177177
OCV_OPTION(WITH_WEBP "Include WebP support" ON IF (NOT IOS AND NOT WINRT) )

platforms/android/build_sdk.py

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ def execute(cmd, shell=False):
1919
elif retcode > 0:
2020
raise Fail("Child returned: %s" % retcode)
2121
except OSError as e:
22-
raise Fail("Execution failed: %s" % e.strerror)
22+
raise Fail("Execution failed: %d / %s" % (e.errno, e.strerror))
2323

2424
def rm_one(d):
2525
d = os.path.abspath(d)
@@ -169,18 +169,23 @@ def build_engine(self, abi, engdest):
169169
for ver, d in self.extra_packs + [("3.0.0", os.path.join(self.libdest, "lib"))]:
170170
r = ET.Element("library", attrib={"version": ver})
171171
log.info("Adding libraries from %s", d)
172+
172173
for f in glob.glob(os.path.join(d, abi.name, "*.so")):
173174
log.info("Copy file: %s", f)
174175
shutil.copy2(f, apklibdest)
175176
if "libnative_camera" in f:
176177
continue
177178
log.info("Register file: %s", os.path.basename(f))
178179
n = ET.SubElement(r, "file", attrib={"name": os.path.basename(f)})
179-
xmlname = os.path.join(apkxmldest, "config%s.xml" % ver.replace(".", ""))
180-
log.info("Generating XML config: %s", xmlname)
181-
ET.ElementTree(r).write(xmlname, encoding="utf-8")
180+
181+
if len(list(r)) > 0:
182+
xmlname = os.path.join(apkxmldest, "config%s.xml" % ver.replace(".", ""))
183+
log.info("Generating XML config: %s", xmlname)
184+
ET.ElementTree(r).write(xmlname, encoding="utf-8")
185+
182186
execute(["ninja", "opencv_engine"])
183-
execute(["ant", "-f", os.path.join(apkdest, "build.xml"), "debug"], shell=True)
187+
execute(["ant", "-f", os.path.join(apkdest, "build.xml"), "debug"],
188+
shell=(sys.platform == 'win32'))
184189
# TODO: Sign apk
185190

186191
def build_javadoc(self):

0 commit comments

Comments
 (0)