From: Maksim Shabunin Date: Tue, 1 Sep 2015 09:14:40 +0000 (+0300) Subject: fixup! Some changes to support mingw-w64 X-Git-Tag: accepted/tizen/6.0/unified/20201030.111113~2281^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e009d79cc8f389c8af8b2b052877f26114b88677;p=platform%2Fupstream%2Fopencv.git fixup! Some changes to support mingw-w64 --- diff --git a/CMakeLists.txt b/CMakeLists.txt index e69fa97..72b1f47 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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) ) diff --git a/platforms/android/build_sdk.py b/platforms/android/build_sdk.py index e2c2d18..274c02d 100755 --- a/platforms/android/build_sdk.py +++ b/platforms/android/build_sdk.py @@ -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):