mirror of
https://github.com/opencv/opencv.git
synced 2024-11-27 20:50:25 +08:00
fixup! Some changes to support mingw-w64
This commit is contained in:
parent
771af4f32d
commit
e009d79cc8
@ -171,7 +171,7 @@ OCV_OPTION(WITH_GSTREAMER "Include Gstreamer support" ON
|
||||
OCV_OPTION(WITH_GSTREAMER_0_10 "Enable Gstreamer 0.10 support (instead of 1.x)" OFF )
|
||||
OCV_OPTION(WITH_GTK "Include GTK support" ON IF (UNIX AND NOT APPLE AND NOT ANDROID) )
|
||||
OCV_OPTION(WITH_GTK_2_X "Use GTK version 2" OFF IF (UNIX AND NOT APPLE AND NOT ANDROID) )
|
||||
OCV_OPTION(WITH_IPP "Include Intel IPP support" ON IF (X86_64 OR X86) AND NOT WINRT AND NOT MINGW )
|
||||
OCV_OPTION(WITH_IPP "Include Intel IPP support" NOT MINGW IF (X86_64 OR X86) AND NOT WINRT )
|
||||
OCV_OPTION(WITH_JASPER "Include JPEG2K support" ON IF (NOT IOS) )
|
||||
OCV_OPTION(WITH_JPEG "Include JPEG support" ON)
|
||||
OCV_OPTION(WITH_WEBP "Include WebP support" ON IF (NOT IOS AND NOT WINRT) )
|
||||
|
@ -19,7 +19,7 @@ def execute(cmd, shell=False):
|
||||
elif retcode > 0:
|
||||
raise Fail("Child returned: %s" % retcode)
|
||||
except OSError as e:
|
||||
raise Fail("Execution failed: %s" % e.strerror)
|
||||
raise Fail("Execution failed: %d / %s" % (e.errno, e.strerror))
|
||||
|
||||
def rm_one(d):
|
||||
d = os.path.abspath(d)
|
||||
@ -169,6 +169,7 @@ class Builder:
|
||||
for ver, d in self.extra_packs + [("3.0.0", os.path.join(self.libdest, "lib"))]:
|
||||
r = ET.Element("library", attrib={"version": ver})
|
||||
log.info("Adding libraries from %s", d)
|
||||
|
||||
for f in glob.glob(os.path.join(d, abi.name, "*.so")):
|
||||
log.info("Copy file: %s", f)
|
||||
shutil.copy2(f, apklibdest)
|
||||
@ -176,11 +177,15 @@ class Builder:
|
||||
continue
|
||||
log.info("Register file: %s", os.path.basename(f))
|
||||
n = ET.SubElement(r, "file", attrib={"name": os.path.basename(f)})
|
||||
xmlname = os.path.join(apkxmldest, "config%s.xml" % ver.replace(".", ""))
|
||||
log.info("Generating XML config: %s", xmlname)
|
||||
ET.ElementTree(r).write(xmlname, encoding="utf-8")
|
||||
|
||||
if len(list(r)) > 0:
|
||||
xmlname = os.path.join(apkxmldest, "config%s.xml" % ver.replace(".", ""))
|
||||
log.info("Generating XML config: %s", xmlname)
|
||||
ET.ElementTree(r).write(xmlname, encoding="utf-8")
|
||||
|
||||
execute(["ninja", "opencv_engine"])
|
||||
execute(["ant", "-f", os.path.join(apkdest, "build.xml"), "debug"], shell=True)
|
||||
execute(["ant", "-f", os.path.join(apkdest, "build.xml"), "debug"],
|
||||
shell=(sys.platform == 'win32'))
|
||||
# TODO: Sign apk
|
||||
|
||||
def build_javadoc(self):
|
||||
|
Loading…
Reference in New Issue
Block a user