From Stephan Huber, OSX and iOS Video support via a QTKit plugin from OSX 10.7 and before, and an AVFoundation plugin for iOS and OSX10.8 and later.
This commit is contained in:
41
CMakeModules/FindAVFoundation.cmake
Normal file
41
CMakeModules/FindAVFoundation.cmake
Normal file
@@ -0,0 +1,41 @@
|
||||
# Locate Apple AVFoundation (next-generation QTKit)
|
||||
# This module defines
|
||||
# AV_FOUNDATION_LIBRARY
|
||||
# AV_FOUNDATION_FOUND, if false, do not try to link to gdal
|
||||
# AV_FOUNDATION_INCLUDE_DIR, where to find the headers
|
||||
#
|
||||
# $AV_FOUNDATION_DIR is an environment variable that would
|
||||
# correspond to the ./configure --prefix=$AV_FOUNDATION_DIR
|
||||
#
|
||||
# Created by Stephan Maximilian Huber
|
||||
|
||||
# QTKit on OS X looks different than QTKit for Windows,
|
||||
# so I am going to case the two.
|
||||
|
||||
IF(APPLE)
|
||||
FIND_PATH(AV_FOUNDATION_INCLUDE_DIR AVFoundation/AVFoundation.h)
|
||||
FIND_LIBRARY(AV_FOUNDATION_LIBRARY AVFoundation)
|
||||
ENDIF()
|
||||
|
||||
SET(AV_FOUNDATION_FOUND "NO")
|
||||
IF(AV_FOUNDATION_LIBRARY AND AV_FOUNDATION_INCLUDE_DIR)
|
||||
SET(AV_FOUNDATION_FOUND "YES")
|
||||
ENDIF()
|
||||
|
||||
IF(OSG_BUILD_PLATFORM_IPHONE OR OSG_BUILD_PLATFORM_IPHONE_SIMULATOR)
|
||||
# TODO, AVFoundation exists ON iOS, too
|
||||
SET(AV_FOUNDATION_FOUND "NO")
|
||||
ENDIF()
|
||||
|
||||
IF(APPLE)
|
||||
# AVFoundation exists since 10.7, but only 10.8 has all features necessary for OSG
|
||||
# so check the SDK-setting
|
||||
|
||||
IF(${OSG_OSX_SDK_NAME} STREQUAL "macosx10.8")
|
||||
# nothing special here ;-)
|
||||
ELSE()
|
||||
MESSAGE("AVFoundation disabled for SDK < 10.8")
|
||||
SET(AV_FOUNDATION_FOUND "NO")
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
|
||||
23
CMakeModules/FindCoreMedia.cmake
Normal file
23
CMakeModules/FindCoreMedia.cmake
Normal file
@@ -0,0 +1,23 @@
|
||||
# Locate Apple CoreMedia
|
||||
# This module defines
|
||||
# COREMEDIA_LIBRARY
|
||||
# COREMEDIA_FOUND, if false, do not try to link to gdal
|
||||
# COREMEDIA_INCLUDE_DIR, where to find the headers
|
||||
#
|
||||
# $COREMEDIA_DIR is an environment variable that would
|
||||
# correspond to the ./configure --prefix=$COREMEDIA_DIR
|
||||
#
|
||||
# Created by Stephan Maximilian Huber.
|
||||
|
||||
|
||||
IF(APPLE)
|
||||
FIND_PATH(COREMEDIA_INCLUDE_DIR CoreMedia/CoreMedia.h)
|
||||
FIND_LIBRARY(COREMEDIA_LIBRARY CoreMedia)
|
||||
ENDIF()
|
||||
|
||||
|
||||
SET(COREMEDIA_FOUND "NO")
|
||||
IF(COREMEDIA_LIBRARY AND COREMEDIA_INCLUDE_DIR)
|
||||
SET(COREMEDIA_FOUND "YES")
|
||||
ENDIF()
|
||||
|
||||
23
CMakeModules/FindQuartzCore.cmake
Normal file
23
CMakeModules/FindQuartzCore.cmake
Normal file
@@ -0,0 +1,23 @@
|
||||
# Locate Apple QuartzCore
|
||||
# This module defines
|
||||
# QUARTZCORE_LIBRARY
|
||||
# QUARTZCORE_FOUND, if false, do not try to link to QUARTZCORE
|
||||
# QUARTZCORE_INCLUDE_DIR, where to find the headers
|
||||
#
|
||||
# $QUARTZCORE_DIR is an environment variable that would
|
||||
# correspond to the ./configure --prefix=$QUARTZCORE_DIR
|
||||
#
|
||||
# Created by Stephan Maximilian Huber.
|
||||
|
||||
|
||||
IF(APPLE)
|
||||
FIND_PATH(QUARTZCORE_INCLUDE_DIR QuartzCore/QuartzCore.h)
|
||||
FIND_LIBRARY(QUARTZCORE_LIBRARY QuartzCore)
|
||||
ENDIF()
|
||||
|
||||
|
||||
SET(QUARTZCORE_FOUND "NO")
|
||||
IF(QUARTZCORE_LIBRARY AND QUARTZCORE_INCLUDE_DIR)
|
||||
SET(QUARTZCORE_FOUND "YES")
|
||||
ENDIF()
|
||||
|
||||
Reference in New Issue
Block a user