File: FindAVFoundation.cmake

package info (click to toggle)
openscenegraph 3.6.5%2Bdfsg1-8
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 40,028 kB
  • sloc: cpp: 392,065; ansic: 21,495; java: 1,020; yacc: 548; makefile: 430; objc: 406; xml: 155; lex: 151; javascript: 34
file content (38 lines) | stat: -rw-r--r-- 1,084 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# 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_DIR is an environment variable that would
# correspond to the ./configure --prefix=$AV_FOUNDATION_DIR
#
# Created by Stephan Maximilian Huber


IF(APPLE)
  FIND_LIBRARY(AV_FOUNDATION_LIBRARY AVFoundation)
ENDIF()

SET(AV_FOUNDATION_FOUND "NO")
IF(AV_FOUNDATION_LIBRARY)
  SET(AV_FOUNDATION_FOUND "YES")
ENDIF()

IF(OSG_BUILD_PLATFORM_IPHONE OR OSG_BUILD_PLATFORM_IPHONE_SIMULATOR)
    # AVFoundation exists ON iOS, too -- good support for SDK 6.0 and greater
    IF(${IPHONE_SDKVER} LESS "6.0")
        SET(AV_FOUNDATION_FOUND "NO")
    ELSE()
        SET(AV_FOUNDATION_FOUND "YES")
    ENDIF()
ELSE()
  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_VERSION VERSION_LESS 10.8)
        MESSAGE("AVFoundation disabled for SDK < 10.8")
        SET(AV_FOUNDATION_FOUND "NO")
      ENDIF()
  ENDIF()
ENDIF()