dynamically linked libs on mobile

pull/22223/head
Michael Klatis 2 years ago
parent 139c443770
commit 7d3dbcb027
  1. 5
      platforms/android/build_sdk.py
  2. 7
      platforms/ios/build_framework.py

@ -160,6 +160,7 @@ class Builder:
self.no_samples_build = True if config.no_samples_build else False
self.opencl = True if config.opencl else False
self.no_kotlin = True if config.no_kotlin else False
self.shared = True if config.shared else False
def get_cmake(self):
if not self.config.use_android_buildtools and check_executable(['cmake', '--version']):
@ -245,6 +246,9 @@ class Builder:
if self.no_kotlin:
cmake_vars['BUILD_KOTLIN_EXTENSIONS'] = "OFF"
if self.shared:
cmake_vars['BUILD_SHARED_LIBS'] = "ON"
if self.config.modules_list is not None:
cmd.append("-DBUILD_LIST='%s'" % self.config.modules_list)
@ -365,6 +369,7 @@ if __name__ == "__main__":
parser.add_argument('--no_samples_build', action="store_true", help="Do not build samples (speeds up build)")
parser.add_argument('--opencl', action="store_true", help="Enable OpenCL support")
parser.add_argument('--no_kotlin', action="store_true", help="Disable Kotlin extensions")
parser.add_argument('--shared', action="store_true", help="Build shared libraries")
args = parser.parse_args()
log.basicConfig(format='%(message)s', level=log.DEBUG)

@ -379,6 +379,13 @@ class Builder:
"-framework", "CoreImage", "-framework", "CoreMedia", "-framework", "QuartzCore",
"-framework", "Accelerate", "-framework", "OpenCL",
]
elif target_platform == "iphoneos" or target_platform == "iphonesimulator":
framework_options = [
"-iframework", "%s/System/iOSSupport/System/Library/Frameworks" % sdk_dir,
"-framework", "AVFoundation", "-framework", "CoreGraphics",
"-framework", "CoreImage", "-framework", "CoreMedia", "-framework", "QuartzCore",
"-framework", "Accelerate", "-framework", "UIKit", "-framework", "CoreVideo",
]
execute([
"clang++",
"-Xlinker", "-rpath",

Loading…
Cancel
Save