Show
Ignore:
Timestamp:
11/24/14 16:24:31 (7 hours ago)
Author:
robert
Message:

From Jan Klimke, "i noticed, that there are a couple of additional flaws when building osg for Mac OS X 10.10 Yosemite.

The mac os sdk version is recognized by the current CMAKE script as 10.1 instead of 10.10 since it cuts the version string from the 4th place. I introduced a more reliable version checking based on splitting the returned version code into MAJOR MINOR and PATCH parts and reassemble the OSG sdk version afterwards.

I replaced the existing CMake code against the following (returning now version 10.10 as expected):

# Determine the canonical name of the selected Platform SDK

EXECUTE_PROCESS(COMMAND "/usr/bin/sw_vers" "-productVersion"

OUTPUT_VARIABLE OSG_OSX_SDK_NAME
OUTPUT_STRIP_TRAILING_WHITESPACE)

STRING(REPLACE "." ";" MACOS_VERSION_LIST ${OSG_OSX_SDK_NAME})
LIST(GET MACOS_VERSION_LIST 0 MACOS_VERSION_MAJOR)
LIST(GET MACOS_VERSION_LIST 1 MACOS_VERSION_MINOR)
LIST(GET MACOS_VERSION_LIST 2 MACOS_VERSION_PATCH)

SET(OSG_OSX_SDK_NAME "macosx${MACOS_VERSION_MAJOR}.${MACOS_VERSION_MINOR}")

Also i added the check for the new Version to some more find scripts.

Additionally the nil object in Objective C now seems to be equivalent with a null_ptr that cannot be passed as GLInt anymore. So i switched this in the PixelBufferCocoa?.mm to pass a zero instead of nil.
"

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • OpenSceneGraph/trunk/examples/osgviewerQt/CMakeLists.txt

    r12415 r13482  
    33) 
    44 
    5 IF( QT4_FOUND ) 
    6     SET(TARGET_EXTERNAL_LIBRARIES ${QT_QTCORE_LIBRARY_RELEASE} ${QT_QTGUI_LIBRARY_RELEASE} ${QT_QTOPENGL_LIBRARY_RELEASE} ) 
     5IF ( NOT Qt5Widgets_FOUND ) 
     6    IF( QT4_FOUND ) 
     7    SET(TARGET_EXTERNAL_LIBRARIES ${QT_QTCORE_LIBRARY_RELEASE} ${QT_QTGUI_LIBRARY_RELEASE} 
     8        ${QT_QTOPENGL_LIBRARY_RELEASE} ) 
    79    ADD_DEFINITIONS(-DUSE_QT4) 
    8 ELSE( QT4_FOUND ) 
     10    ELSE( QT4_FOUND ) 
    911    SET(TARGET_EXTERNAL_LIBRARIES ${QT_LIBRARIES} ) 
    10 ENDIF( QT4_FOUND ) 
     12    ENDIF( QT4_FOUND ) 
    1113 
    12 INCLUDE_DIRECTORIES( ${QT_INCLUDE_DIR} ) 
     14    INCLUDE_DIRECTORIES( ${QT_INCLUDE_DIR} ${QT_QTCORE_INCLUDE_DIR} ${QT_QTGUI_INCLUDE_DIR} 
     15             ${QT_QTOPENGL_INCLUDE_DIR} ) 
     16ENDIF() 
    1317 
    1418SET(TARGET_ADDED_LIBRARIES osgWidget osgQt) 
    1519 
    16 SETUP_EXAMPLE( osgviewerQt ) 
     20SET( EXAMPLE_NAME osgviewerQt ) 
     21 
     22SETUP_EXAMPLE( ${EXAMPLE_NAME} ) 
     23 
     24IF ( Qt5Widgets_FOUND ) 
     25    qt5_use_modules( example_${EXAMPLE_NAME} Widgets OpenGL ) 
     26ENDIF( Qt5Widgets_FOUND ) 
     27