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).
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)
# custom option to flag an iOS build
OPTION(OSG_BUILD_PLATFORM_IPHONE "Enable IPhoneSDK Device support" OFF)
@ -81,9 +82,9 @@ ELSIF(APPLE)
ELSE()
# 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 or X11.")
SET(OSG_WINDOWING_SYSTEM "Carbon" CACHE STRING "Windowing system type for graphics window creation; options: Carbon, Cocoa, X11 or None.")
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()
# Set defaults for Universal Binaries. We want 32-bit Intel/PPC on 10.4
@ -111,7 +112,7 @@ ELSIF(APPLE)
ENDIF()
ENDIF()
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()

View File

@ -57,7 +57,7 @@ SET(LIB_COMMON_FILES
# Collect all the configuration files
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
# 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
PixelBufferWin32.cpp
)
ELSE()
IF(${OSG_WINDOWING_SYSTEM} STREQUAL "Cocoa")
ELSIF(${OSG_WINDOWING_SYSTEM} STREQUAL "Cocoa")
ADD_DEFINITIONS(-DUSE_DARWIN_COCOA_IMPLEMENTATION)
IF(OSG_COMPILE_FRAMEWORKS)
@ -109,7 +108,7 @@ ELSE()
)
SET(LIB_EXTRA_LIBS ${COCOA_LIBRARY} ${LIB_EXTRA_LIBS})
ELSEIF(${OSG_WINDOWING_SYSTEM} STREQUAL "Carbon")
ELSEIF(${OSG_WINDOWING_SYSTEM} STREQUAL "Carbon")
ADD_DEFINITIONS(-DUSE_DARWIN_CARBON_IMPLEMENTATION)
IF(OSG_COMPILE_FRAMEWORKS)
@ -138,7 +137,7 @@ ELSE()
SET(LIB_EXTRA_LIBS ${COCOA_LIBRARY} ${AGL_LIBRARY} ${LIB_EXTRA_LIBS})
ELSEIF(${OSG_WINDOWING_SYSTEM} STREQUAL "IOS")
ELSEIF(${OSG_WINDOWING_SYSTEM} STREQUAL "IOS")
ADD_DEFINITIONS(-DUSE_IOS_IMPLEMENTATION)
@ -163,7 +162,7 @@ ELSE()
SET(LIB_EXTRA_LIBS ${COCOA_LIBRARY} ${LIB_EXTRA_LIBS})
ELSEIF(${OSG_WINDOWING_SYSTEM} STREQUAL "X11")
ELSEIF(${OSG_WINDOWING_SYSTEM} STREQUAL "X11")
# X11 for everybody else
INCLUDE(FindPkgConfig OPTIONAL)
IF(PKG_CONFIG_FOUND)
@ -228,9 +227,8 @@ ELSE()
SET(LIB_EXTRA_LIBS ${X11_X11_LIB} ${LIB_EXTRA_LIBS})
ENDIF(APPLE)
ELSE()
ELSE()
MESSAGE(STATUS "Windowing system not supported")
ENDIF()
ENDIF()