Changeset 11182

Show
Ignore:
Timestamp:
03/10/10 12:01:17 (4 years ago)
Author:
robert
Message:

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.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • OpenSceneGraph/trunk/CMakeModules/FindQuickTime.cmake

    r7766 r11182  
    1616  FIND_PATH(QUICKTIME_INCLUDE_DIR QuickTime/QuickTime.h) 
    1717  FIND_LIBRARY(QUICKTIME_LIBRARY QuickTime) 
    18 ELSE(APPLE) 
     18ELSE() 
    1919  FIND_PATH(QUICKTIME_INCLUDE_DIR QuickTime.h 
    2020    $ENV{QUICKTIME_DIR}/include 
     
    4040  ) 
    4141  FIND_LIBRARY(QUICKTIME_LIBRARY QuickTime) 
    42 ENDIF(APPLE) 
     42ENDIF() 
     43 
    4344 
    4445SET(QUICKTIME_FOUND "NO") 
    4546IF(QUICKTIME_LIBRARY AND QUICKTIME_INCLUDE_DIR) 
    4647  SET(QUICKTIME_FOUND "YES") 
    47 ENDIF(QUICKTIME_LIBRARY AND QUICKTIME_INCLUDE_DIR) 
     48ENDIF() 
    4849 
    49  
     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()