Fixed target device family

This commit is contained in:
Dal Rupnik 2017-01-16 18:36:07 +01:00
parent 58384f142f
commit beec247c4e
3 changed files with 4 additions and 9 deletions

View File

@ -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"
)

View File

@ -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)
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")
if(APPLE_FRAMEWORK AND BUILD_SHARED_LIBS)
list(APPEND VIDEOIO_LIBRARIES "-framework UIKit")
endif()
endif()

View File

@ -24,10 +24,5 @@
</array>
<key>MinimumOSVersion</key>
<string>8.0</string>
<key>UIDeviceFamily</key>
<array>
<integer>1</integer>
<integer>2</integer>
</array>
</dict>
</plist>