CMake: Win32 option added to OSG_WINDOWING_SYSTEM

This commit is contained in:
Konstantin S. Matveyev 2019-04-14 00:47:36 +03:00
parent b5dff94107
commit 036bb7b472
2 changed files with 133 additions and 134 deletions

View File

@ -50,8 +50,9 @@ ENDIF()
# value is needed to find the correct version of OpenGL (X11 or Cocoa). # value is needed to find the correct version of OpenGL (X11 or Cocoa).
IF(ANDROID) IF(ANDROID)
SET(OSG_WINDOWING_SYSTEM "None" CACHE STRING "None Windowing system type for graphics window creation.") SET(OSG_WINDOWING_SYSTEM "None" CACHE STRING "Windowing system type for graphics window creation; options: None.")
ELSIF(WIN32)
SET(OSG_WINDOWING_SYSTEM "Win32" CACHE STRING "Windowing system type for graphics window creation; options: Win32 or None.")
ELSIF(APPLE) ELSIF(APPLE)
# custom option to flag an iOS build # custom option to flag an iOS build
OPTION(OSG_BUILD_PLATFORM_IPHONE "Enable IPhoneSDK Device support" OFF) OPTION(OSG_BUILD_PLATFORM_IPHONE "Enable IPhoneSDK Device support" OFF)
@ -81,9 +82,9 @@ ELSIF(APPLE)
ELSE() ELSE()
# OSX >= 10.5 uses Cocoa windowing system, otherwise Carbon # OSX >= 10.5 uses Cocoa windowing system, otherwise Carbon
IF(OSG_OSX_VERSION VERSION_LESS 10.5) 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 or X11.") SET(OSG_WINDOWING_SYSTEM "Carbon" CACHE STRING "Windowing system type for graphics window creation; options: Carbon, Cocoa, X11 or None.")
ELSE() ELSE()
SET(OSG_WINDOWING_SYSTEM "Cocoa" CACHE STRING "Windowing system type for graphics window creation, options Carbon, Cocoa or X11.") SET(OSG_WINDOWING_SYSTEM "Cocoa" CACHE STRING "Windowing system type for graphics window creation; options: Carbon, Cocoa, X11 or None.")
ENDIF() ENDIF()
# Set defaults for Universal Binaries. We want 32-bit Intel/PPC on 10.4 # Set defaults for Universal Binaries. We want 32-bit Intel/PPC on 10.4
@ -111,7 +112,7 @@ ELSIF(APPLE)
ENDIF() ENDIF()
ENDIF() ENDIF()
ELSE() ELSE()
SET(OSG_WINDOWING_SYSTEM "X11" CACHE STRING "Windowing system type for graphics window creation. options only X11") SET(OSG_WINDOWING_SYSTEM "X11" CACHE STRING "Windowing system type for graphics window creation; options: X11 or None.")
ENDIF() ENDIF()

View File

@ -57,7 +57,7 @@ SET(LIB_COMMON_FILES
# Collect all the configuration files # Collect all the configuration files
SET(LIB_EXTRA_LIBS) SET(LIB_EXTRA_LIBS)
IF(WIN32 AND NOT ANDROID) IF(${OSG_WINDOWING_SYSTEM} STREQUAL "Win32")
# #
# Enable workaround for OpenGL driver issues when used in multithreaded/multiscreen with NVidia drivers on Windows XP # Enable workaround for OpenGL driver issues when used in multithreaded/multiscreen with NVidia drivers on Windows XP
# For example: osgviewer dumptruck.osg was showing total garbage (screen looked like shattered, splashed hedgehog) # For example: osgviewer dumptruck.osg was showing total garbage (screen looked like shattered, splashed hedgehog)
@ -80,8 +80,7 @@ IF(WIN32 AND NOT ANDROID)
GraphicsWindowWin32.cpp GraphicsWindowWin32.cpp
PixelBufferWin32.cpp PixelBufferWin32.cpp
) )
ELSE() ELSIF(${OSG_WINDOWING_SYSTEM} STREQUAL "Cocoa")
IF(${OSG_WINDOWING_SYSTEM} STREQUAL "Cocoa")
ADD_DEFINITIONS(-DUSE_DARWIN_COCOA_IMPLEMENTATION) ADD_DEFINITIONS(-DUSE_DARWIN_COCOA_IMPLEMENTATION)
IF(OSG_COMPILE_FRAMEWORKS) IF(OSG_COMPILE_FRAMEWORKS)
@ -231,7 +230,6 @@ ELSE()
ELSE() ELSE()
MESSAGE(STATUS "Windowing system not supported") MESSAGE(STATUS "Windowing system not supported")
ENDIF() ENDIF()
ENDIF()
SET(TARGET_SRC SET(TARGET_SRC