Commit b118ab41 authored by François Grisez's avatar François Grisez
Browse files

Set the minimum iOS version to 11.0 for VideoToolbox source files.

parent 38a43a6a
......@@ -107,6 +107,7 @@ cmake_dependent_option(ENABLE_VPX "Build mediastreamer2 with VPX codec." YES "EN
option(ENABLE_MKV "Enable support of MKV files reading and writing." YES)
cmake_dependent_option(ENABLE_QNX "Build medistreamer2 with BB10 filters." NO "ENABLE_VIDEO" NO)
cmake_dependent_option(ENABLE_VT_H264 "Build mediastreamer2 with H264 encoder/decoder based on VirtualToolbox (Apple only)" YES "ENABLE_VIDEO" NO)
cmake_dependent_option(ENABLE_VT_H265 "Build mediastreamer2 with H265 encoder/decoder based on VirtualToolbox (Apple only)" YES "ENABLE_VIDEO" NO)
option(ENABLE_JPEG "Enable JPEG support" YES)
option(ENABLE_QRCODE "Enable QRCode support" YES)
......@@ -539,7 +540,7 @@ if(APPLE)
list(APPEND LINK_FLAGS "-framework Foundation" "-framework QuartzCore" "-framework OpenGLES" "-framework UIKit" "-framework AVFoundation")
if(ENABLE_VIDEO)
list(APPEND LINK_FLAGS "-framework CoreGraphics" "-framework CoreMedia" "-framework CoreVideo")
if(ENABLE_VT_H264) # Necessary on iOS for Mediastreamer's tools and testers
if(ENABLE_VT_H264 OR ENABLE_VT_H265) # Necessary on iOS for Mediastreamer's tools and testers
list(APPEND LINK_FLAGS "-framework VideoToolbox")
endif()
endif()
......@@ -550,7 +551,7 @@ if(APPLE)
endif()
if(ENABLE_VIDEO)
list(APPEND LINK_FLAGS "-framework Cocoa" "-framework OpenGL" "-framework QuartzCore" "-framework AVFoundation")
if(ENABLE_VT_H264)
if(ENABLE_VT_H264 OR ENABLE_VT_H265)
list(APPEND LINK_FLAGS "-framework VideoToolbox -framework CoreMedia")
endif()
endif()
......
......@@ -367,13 +367,14 @@ if(ENABLE_VIDEO)
)
endif()
endif()
if(APPLE)
list(APPEND VOIP_SOURCE_FILES_CXX
if (APPLE AND (ENABLE_VT_H265 OR ENABLE_VT_H264))
set(VIDEOTOOLBOX_CODEC_SOURCE_FILES
videofilters/videotoolbox.cpp
voip/h26x/videotoolbox-decoder.cpp
voip/h26x/videotoolbox-encoder.cpp
voip/h26x/videotoolbox-utils.cpp
)
list(APPEND VOIP_SOURCE_FILES_CXX ${VIDEOTOOLBOX_CODEC_SOURCE_FILES})
endif()
if(ANDROID)
list(APPEND VOIP_SOURCE_FILES_C
......@@ -540,6 +541,11 @@ bc_apply_compile_flags(VOIP_SOURCE_FILES_OBJC STRICT_OPTIONS_CPP STRICT_OPTIONS_
if(VOIP_SOURCE_FILES_CXX)
set_source_files_properties(${VOIP_SOURCE_FILES_CXX} PROPERTIES LANGUAGE CXX)
bc_apply_compile_flags(VOIP_SOURCE_FILES_CXX STRICT_OPTIONS_CPP STRICT_OPTIONS_CXX)
if(IOS AND VIDEOTOOLBOX_CODEC_SOURCE_FILES)
set_source_files_properties(${VIDEOTOOLBOX_CODEC_SOURCE_FILES}
PROPERTIES COMPILE_FLAGS "-miphoneos-version-min=11.0"
)
endif()
endif()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment