Merge pull request #8234 from alalek:issue_8121

pull/8249/head
Alexander Alekhin 8 years ago
commit ee9c0f5f9c
  1. 4
      CMakeLists.txt
  2. 3
      modules/imgcodecs/CMakeLists.txt
  3. 2
      modules/videoio/CMakeLists.txt
  4. 59
      platforms/ios/build_framework.py

@ -519,7 +519,9 @@ endif(WIN32 AND NOT MINGW)
# CHECK FOR SYSTEM LIBRARIES, OPTIONS, ETC..
# ----------------------------------------------------------------------------
if(UNIX)
find_package(PkgConfig QUIET)
if(NOT APPLE_FRAMEWORK)
find_package(PkgConfig QUIET)
endif()
include(CheckFunctionExists)
include(CheckIncludeFile)

@ -92,6 +92,9 @@ if(IOS)
list(APPEND imgcodecs_srcs ${CMAKE_CURRENT_LIST_DIR}/src/ios_conversions.mm)
list(APPEND IMGCODECS_LIBRARIES "-framework Accelerate" "-framework CoreGraphics" "-framework QuartzCore" "-framework AssetsLibrary")
endif()
if(APPLE_FRAMEWORK)
list(APPEND IMGCODECS_LIBRARIES "-framework UIKit")
endif()
if(UNIX)
#these variables are set by CHECK_MODULE macro

@ -210,7 +210,7 @@ if(IOS)
${CMAKE_CURRENT_LIST_DIR}/src/cap_ios_video_camera.mm)
list(APPEND VIDEOIO_LIBRARIES "-framework Accelerate" "-framework AVFoundation" "-framework CoreGraphics" "-framework CoreImage" "-framework CoreMedia" "-framework CoreVideo" "-framework QuartzCore" "-framework AssetsLibrary")
if(APPLE_FRAMEWORK AND BUILD_SHARED_LIBS)
if(APPLE_FRAMEWORK)
list(APPEND VIDEOIO_LIBRARIES "-framework UIKit")
endif()
endif()

@ -122,37 +122,32 @@ class Builder:
def getCMakeArgs(self, arch, target):
if self.dynamic:
args = [
"cmake",
"-GXcode",
"-DAPPLE_FRAMEWORK=ON",
"-DCMAKE_INSTALL_PREFIX=install",
"-DCMAKE_BUILD_TYPE=Release",
"-DBUILD_SHARED_LIBS=ON",
"-DCMAKE_MACOSX_BUNDLE=ON",
"-DCMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_REQUIRED=NO",
]
else:
args = [
"cmake",
"-GXcode",
"-DAPPLE_FRAMEWORK=ON",
"-DCMAKE_INSTALL_PREFIX=install",
"-DCMAKE_BUILD_TYPE=Release",
]
args = [
"cmake",
"-GXcode",
"-DAPPLE_FRAMEWORK=ON",
"-DCMAKE_INSTALL_PREFIX=install",
"-DCMAKE_BUILD_TYPE=Release",
] + ([
"-DBUILD_SHARED_LIBS=ON",
"-DCMAKE_MACOSX_BUNDLE=ON",
"-DCMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_REQUIRED=NO",
] if self.dynamic else [])
if len(self.exclude) > 0:
args += ["-DBUILD_opencv_world=OFF"]
args += ("-DBUILD_opencv_%s=OFF" % m for m in self.exclude)
args += ["-DBUILD_opencv_world=OFF"] if not self.dynamic else []
args += ["-DBUILD_opencv_%s=OFF" % m for m in self.exclude]
return args
def getBuildCommand(self, archs, target):
buildcmd = [
"xcodebuild",
]
if self.dynamic:
buildcmd = [
"xcodebuild",
buildcmd += [
"IPHONEOS_DEPLOYMENT_TARGET=8.0",
"ONLY_ACTIVE_ARCH=NO",
]
@ -160,25 +155,19 @@ class Builder:
for arch in archs:
buildcmd.append("-arch")
buildcmd.append(arch.lower())
buildcmd += [
"-sdk", target.lower(),
"-configuration", "Release",
"-parallelizeTargets",
"-jobs", "4",
"-target","ALL_BUILD",
]
else:
arch = ";".join(archs)
buildcmd = [
"xcodebuild",
buildcmd += [
"IPHONEOS_DEPLOYMENT_TARGET=6.0",
"ARCHS=%s" % arch,
]
buildcmd += [
"-sdk", target.lower(),
"-configuration", "Release",
"-parallelizeTargets",
"-jobs", "4"
]
"-jobs", "4",
] + (["-target","ALL_BUILD"] if self.dynamic else [])
return buildcmd

Loading…
Cancel
Save