diff --git a/CMakeLists.txt b/CMakeLists.txt index e0dddf8fd..a4b8491a0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -85,6 +85,7 @@ ELSEIF(APPLE) # OSX >= 10.5 uses Cocoa windowing system, otherwise Carbon IF(OSG_OSX_VERSION VERSION_LESS 10.5) SET(OSG_WINDOWING_SYSTEM "Carbon" CACHE STRING "Windowing system type for graphics window creation; options: Carbon, Cocoa, X11 or None.") + SET(OSG_WINDOWING_SYSTEM_CARBON ON INTERNAL "use Carbon (apple; 32 bit only)") ELSE() SET(OSG_WINDOWING_SYSTEM "Cocoa" CACHE STRING "Windowing system type for graphics window creation; options: Carbon, Cocoa, X11 or None.") ENDIF() diff --git a/include/osgViewer/GraphicsWindow b/include/osgViewer/GraphicsWindow index b09f56e5e..c2eb6aacb 100644 --- a/include/osgViewer/GraphicsWindow +++ b/include/osgViewer/GraphicsWindow @@ -286,7 +286,11 @@ struct GraphicsWindowFunctionProxy #if defined(_WIN32) #define USE_GRAPHICSWINDOW() USE_GRAPICSWINDOW_IMPLEMENTATION(Win32) #elif defined(__APPLE__) + #if defined(OSG_WINDOWING_SYSTEM_CARBON) #define USE_GRAPHICSWINDOW() USE_GRAPICSWINDOW_IMPLEMENTATION(Carbon) + #else + #define USE_GRAPHICSWINDOW() USE_GRAPICSWINDOW_IMPLEMENTATION(Cocoa) + #endif #else #define USE_GRAPHICSWINDOW() USE_GRAPICSWINDOW_IMPLEMENTATION(X11) #endif diff --git a/src/osg/Config.in b/src/osg/Config.in index 583b16aa8..342069a08 100644 --- a/src/osg/Config.in +++ b/src/osg/Config.in @@ -36,5 +36,6 @@ #cmakedefine OSG_PROVIDE_READFILE #cmakedefine OSG_USE_DEPRECATED_API #cmakedefine OSG_ENVVAR_SUPPORTED +#cmakedefine OSG_WINDOWING_SYSTEM_CARBON #endif