1# Locate Apple QTKit (next-generation QuickTime) 2# This module defines 3# QTKIT_LIBRARY 4# QTKIT_FOUND, if false, do not try to link to gdal 5# QTKIT_INCLUDE_DIR, where to find the headers 6# 7# $QTKIT_DIR is an environment variable that would 8# correspond to the ./configure --prefix=$QTKIT_DIR 9# 10# Created by Eric Wing. 11 12# QTKit on OS X looks different than QTKit for Windows, 13# so I am going to case the two. 14 15IF(APPLE) 16 FIND_PATH(QTKIT_INCLUDE_DIR QTKit/QTKit.h) 17 FIND_LIBRARY(QTKIT_LIBRARY QTKit) 18ENDIF() 19 20 21SET(QTKIT_FOUND "NO") 22IF(QTKIT_LIBRARY AND QTKIT_INCLUDE_DIR) 23 SET(QTKIT_FOUND "YES") 24ENDIF() 25 26IF(OSG_BUILD_PLATFORM_IPHONE OR OSG_BUILD_PLATFORM_IPHONE_SIMULATOR) 27 SET(QTKIT_FOUND "NO") 28ENDIF() 29 30IF(APPLE) 31 # Technically QTKit is 64-bit capable, but the QTKit plug-in currently uses 32 # a few 32-bit only APIs to bridge QTKit and Core Video. 33 # As such, the plugin won't compile for 64-bit until Apple fixes this hole 34 # in their API. 35 # For simplicitly, I pretend QTKit is only 32-bit, but if/when Apple fixes 36 # this, we need an OS version check. 37 # Snow Leopard still lacks a 64-bit path for this. 38 #First check to see if we are running with a native 64-bit compiler (10.6 default) and implicit arch 39 IF(NOT CMAKE_OSX_ARCHITECTURES AND CMAKE_SIZEOF_VOID_P EQUAL 8) 40 SET(QTKIT_FOUND "NO") 41 ELSE() 42 #Otherwise check to see if 64-bit is explicitly called for. 43 LIST(FIND CMAKE_OSX_ARCHITECTURES "x86_64" has64Compile) 44 IF(NOT has64Compile EQUAL -1) 45 SET(QTKIT_FOUND "NO") 46 ENDIF() 47 ENDIF() 48ENDIF() 49 50