Merge pull request #837 from LaurensVoerman/carbonFix

fix apple carbon reference
This commit is contained in:
OpenSceneGraph git repository 2019-12-11 17:51:02 +00:00 committed by GitHub
commit c8e283cfe9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 0 deletions

View File

@ -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()

View File

@ -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

View File

@ -36,5 +36,6 @@
#cmakedefine OSG_PROVIDE_READFILE
#cmakedefine OSG_USE_DEPRECATED_API
#cmakedefine OSG_ENVVAR_SUPPORTED
#cmakedefine OSG_WINDOWING_SYSTEM_CARBON
#endif