CMake file formatting.

This commit is contained in:
Camilla Berglund 2013-01-16 00:08:01 +01:00
parent 121ce7fbd6
commit bd2abbca9f

View File

@ -20,7 +20,7 @@ endif()
if (GLFW_USE_EGL) if (GLFW_USE_EGL)
set(GLFW_CLIENT_LIBRARY "opengl" CACHE STRING set(GLFW_CLIENT_LIBRARY "opengl" CACHE STRING
"The client library to use; one of: opengl, glesv1 or glesv2") "The client library to use; one of opengl, glesv1 or glesv2")
if (${GLFW_CLIENT_LIBRARY} STREQUAL "opengl") if (${GLFW_CLIENT_LIBRARY} STREQUAL "opengl")
set(_GLFW_USE_OPENGL 1) set(_GLFW_USE_OPENGL 1)
@ -67,7 +67,7 @@ if (BUILD_SHARED_LIBS)
endif() endif()
#-------------------------------------------------------------------- #--------------------------------------------------------------------
# Detect and select target APIs # Detect and select backend APIs
#-------------------------------------------------------------------- #--------------------------------------------------------------------
if (WIN32) if (WIN32)
set(_GLFW_WIN32 1) set(_GLFW_WIN32 1)
@ -83,13 +83,8 @@ if (WIN32)
elseif (APPLE) elseif (APPLE)
set(_GLFW_COCOA 1) set(_GLFW_COCOA 1)
message(STATUS "Using Cocoa for window creation") message(STATUS "Using Cocoa for window creation")
set(_GLFW_NSGL 1)
if (GLFW_USE_EGL) message(STATUS "Using NSGL for context creation")
message(FATAL_ERROR "EGL not supported on Mac OS X")
else()
set(_GLFW_NSGL 1)
message(STATUS "Using NSGL for context creation")
endif()
elseif (UNIX) elseif (UNIX)
set(_GLFW_X11 1) set(_GLFW_X11 1)
message(STATUS "Using X11 for window creation") message(STATUS "Using X11 for window creation")
@ -106,7 +101,7 @@ else()
endif() endif()
#-------------------------------------------------------------------- #--------------------------------------------------------------------
# Set up GLFW for Win32 # Use Win32 for window creation
#-------------------------------------------------------------------- #--------------------------------------------------------------------
if (_GLFW_WIN32) if (_GLFW_WIN32)
@ -133,7 +128,7 @@ if (_GLFW_WIN32)
endif() endif()
#-------------------------------------------------------------------- #--------------------------------------------------------------------
# Set up GLFW for WGL # Use WGL for context creation
#-------------------------------------------------------------------- #--------------------------------------------------------------------
if (_GLFW_WGL) if (_GLFW_WGL)
list(APPEND glfw_INCLUDE_DIRS ${OPENGL_INCLUDE_DIR}) list(APPEND glfw_INCLUDE_DIRS ${OPENGL_INCLUDE_DIR})
@ -141,7 +136,7 @@ if (_GLFW_WGL)
endif() endif()
#-------------------------------------------------------------------- #--------------------------------------------------------------------
# Set up GLFW for Xlib and GLX or EGL on Unix-like systems with X Windows # Use X11 for window creation
#-------------------------------------------------------------------- #--------------------------------------------------------------------
if (_GLFW_X11) if (_GLFW_X11)
@ -202,7 +197,7 @@ if (_GLFW_X11)
endif() endif()
#-------------------------------------------------------------------- #--------------------------------------------------------------------
# GLX Context # Use GLX for context creation
#-------------------------------------------------------------------- #--------------------------------------------------------------------
if (_GLFW_GLX) if (_GLFW_GLX)