diff --git a/cmake/OpenCVUtils.cmake b/cmake/OpenCVUtils.cmake index 6ab466d4d7..7a0e448f77 100644 --- a/cmake/OpenCVUtils.cmake +++ b/cmake/OpenCVUtils.cmake @@ -936,7 +936,7 @@ function(ocv_add_library target) endif() if(APPLE_FRAMEWORK AND BUILD_SHARED_LIBS) - message("Setting Apple target properties for " ${target}) + message(STATUS "Setting Apple target properties for ${target}") set(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG 1) @@ -952,6 +952,7 @@ function(ocv_add_library target) INSTALL_NAME_DIR "@rpath" BUILD_WITH_INSTALL_RPATH 1 LIBRARY_OUTPUT_NAME "opencv2" + XCODE_ATTRIBUTE_TARGETED_DEVICE_FAMILY "1,2" #PUBLIC_HEADER "${OPENCV_CONFIG_FILE_INCLUDE_DIR}/cvconfig.h" #XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY "iPhone Developer" ) diff --git a/modules/videoio/CMakeLists.txt b/modules/videoio/CMakeLists.txt index f2023e8c0b..8a5b9d7a36 100644 --- a/modules/videoio/CMakeLists.txt +++ b/modules/videoio/CMakeLists.txt @@ -209,10 +209,9 @@ if(IOS) ${CMAKE_CURRENT_LIST_DIR}/src/cap_ios_photo_camera.mm ${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) - list(APPEND VIDEOIO_LIBRARIES "-framework Accelerate" "-framework AVFoundation" "-framework CoreGraphics" "-framework CoreImage" "-framework CoreMedia" "-framework CoreVideo" "-framework QuartzCore" "-framework AssetsLibrary" "-framework UIKit") - else() - list(APPEND VIDEOIO_LIBRARIES "-framework Accelerate" "-framework AVFoundation" "-framework CoreGraphics" "-framework CoreImage" "-framework CoreMedia" "-framework CoreVideo" "-framework QuartzCore" "-framework AssetsLibrary") + list(APPEND VIDEOIO_LIBRARIES "-framework UIKit") endif() endif() diff --git a/platforms/ios/Info.Dynamic.plist.in b/platforms/ios/Info.Dynamic.plist.in index 9371757a6f..4ff68cca04 100644 --- a/platforms/ios/Info.Dynamic.plist.in +++ b/platforms/ios/Info.Dynamic.plist.in @@ -24,10 +24,5 @@ MinimumOSVersion 8.0 - UIDeviceFamily - - 1 - 2 - \ No newline at end of file