root/OpenSceneGraph/trunk/CMakeModules/FindQuickTime.cmake @ 11182

Revision 11182, 1.8 kB (checked in by robert, 4 years ago)

Based on a suggestion from Chuck Seberino, have added a section for testing of 64bit build under OSX and disable the use of quicktime when the build includes 64bit.

  • Property svn:eol-style set to native
RevLine 
[6306]1# Locate QuickTime
2# This module defines
3# QUICKTIME_LIBRARY
4# QUICKTIME_FOUND, if false, do not try to link to gdal
5# QUICKTIME_INCLUDE_DIR, where to find the headers
6#
7# $QUICKTIME_DIR is an environment variable that would
8# correspond to the ./configure --prefix=$QUICKTIME_DIR
9#
10# Created by Eric Wing.
11
12# QuickTime on OS X looks different than QuickTime for Windows,
13# so I am going to case the two.
14
15IF(APPLE)
[7766]16  FIND_PATH(QUICKTIME_INCLUDE_DIR QuickTime/QuickTime.h)
17  FIND_LIBRARY(QUICKTIME_LIBRARY QuickTime)
[11182]18ELSE()
[7766]19  FIND_PATH(QUICKTIME_INCLUDE_DIR QuickTime.h
20    $ENV{QUICKTIME_DIR}/include
21    $ENV{QUICKTIME_DIR}
22    NO_DEFAULT_PATH
23  )
24  FIND_PATH(QUICKTIME_INCLUDE_DIR QuickTime.h
25    PATHS ${CMAKE_PREFIX_PATH} # Unofficial: We are proposing this.
26    NO_DEFAULT_PATH
27    PATH_SUFFIXES include
28  )
29  FIND_PATH(QUICKTIME_INCLUDE_DIR QuickTime.h)
30
31  FIND_LIBRARY(QUICKTIME_LIBRARY QuickTime
32    $ENV{QUICKTIME_DIR}/lib
33    $ENV{QUICKTIME_DIR}
34    NO_DEFAULT_PATH
35  )
36  FIND_LIBRARY(QUICKTIME_LIBRARY QuickTime
37    PATHS ${CMAKE_PREFIX_PATH} # Unofficial: We are proposing this.
38    NO_DEFAULT_PATH
39    PATH_SUFFIXES lib64 lib
40  )
41  FIND_LIBRARY(QUICKTIME_LIBRARY QuickTime)
[11182]42ENDIF()
[6306]43
[11182]44
[6306]45SET(QUICKTIME_FOUND "NO")
46IF(QUICKTIME_LIBRARY AND QUICKTIME_INCLUDE_DIR)
[7766]47  SET(QUICKTIME_FOUND "YES")
[11182]48ENDIF()
[6306]49
[11182]50IF(APPLE)
51    #Quicktime is not supported under 64bit OSX build so we need to detect it and disable it.
52    #First check to see if we are running with a native 64-bit compiler (10.6 default) and implicit arch
53    IF(NOT CMAKE_OSX_ARCHITECTURES AND CMAKE_SIZEOF_VOID_P EQUAL 8)
54        SET(QUICKTIME_FOUND "NO")
55    ELSE()
56        #Otherwise check to see if 64-bit is explicitly called for.
57        LIST(FIND CMAKE_OSX_ARCHITECTURES "x86_64" has64Compile)
58        IF(NOT has64Compile EQUAL -1)
59            SET(QUICKTIME_FOUND "NO")
60        ENDIF()
61    ENDIF()
62ENDIF()
Note: See TracBrowser for help on using the browser.